#10959 closed bug (fixed)
[package_daemon] failed to remove transaction directory: Directory not empty
Reported by: | diver | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta2 |
Component: | Servers/package_daemon | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
package_daemon failes to activate a package If for some reason there is a leftover settings directory.
Took me quite some time to figure out why my package didn't want to activate, because when installed manually there is no error in syslog.
To reproduce:
pkgman uninstall man rm -rf /system/packages/administrative/writable-files/man-1.6g-4 mkdir -p /system/packages/administrative/writable-files/man-1.6g-4 pkgman install man
Attachments (1)
Change History (20)
comment:1 by , 11 years ago
Milestone: | R1 → R1/alpha5 |
---|---|
Priority: | normal → blocker |
comment:2 by , 11 years ago
Cc: | added |
---|
Same here, tried upgrading a system and got the exact same message; I then tried bisecting to find out which rev causes trouble:
- modified the
/system/settings/package-repositories/Haiku
file to point not tocurrent
but instead to hrev47470: it worked (rebooted to be sure, came up to the new rev as expected). - modified it to point to hrev47480: worked again.
- modified it to point to hrev47490: didn't work per se, and additionally pkgman utilisability became hosed for good at this point.. I'm even unable to peddle back and do back to 47480 any more.. Didn't dig deep though, it might be because I was hacking directly to the file rather than using the pkgman add-repo command.
So there is a set of hpkg's between 47480 and 47490 that causes trouble it seems.
There is a ticket titled "various quirks when upgrading" but these new symptoms differ somewhat.
Edit: it appears that...
- my remark about the pkgman command no longer working was just silly pebkac: in the process of doing the bisecting search I ended up picking hrev47485, which does not exist on the server.. Once I moved on to 47486 the bisecting worked again.
- the bisecting led me to between hrev47489 and hrev47490: doing a
pkgman update
from the former to the latter eventually results in the oddOld activation state backed up in ""
error mentionned above (which has been found to be off-topic for this ticket). It might be due to an FBC problem or whatever, since the sizeof() of class hpkgwriter seemingly changed in that revision.. And nothing is written in the syslog by the package_daemon during the execution so no help there.. Not important since...: - To solve my problem I'll simply install from a nightly build this time, and from then on I know I'll be able to 'update' again, as per comment:5 ; so this is just a temporary inconvenience, not looking forward to file a ticket.
comment:3 by , 11 years ago
Yeah, I closed #10278 because package upgrades mostly worked, and as you just discovered this is indeed a new regression. I don't think it works at all post-*90, so something got broken in there. I wonder if Ingo's changes to the bootloader and package_kit caused the problem? At any rate, I don't think we can do much except wait for him to investigate.
comment:4 by , 11 years ago
Just got this while installing packages I had built with HaikuPorter, so it has nothing to do with some specific set of HPKGs and some bug in the package system.
comment:5 by , 11 years ago
Priority: | blocker → normal |
---|
The "failed to remove transaction directory" error message is just a harmless symptom of missing client-side error handling. It will be printed whenever some package couldn't be installed. The actual error occurred earlier (most likely in the package daemon).
At a first glance the issue reported by diver is not related to the issue reported in the comments. Manipulating the data in the administrative directory -- on which the package daemon relies -- may cause problems. Obviously the daemon should try to work as robustly as possible. I think it can do better in this case, which is why the ticket is still open.
For the other issues please open new tickets (don't forget to include a syslog). FWIW I just tried a system update on x86 from hrev47494 to hrev47499, which worked fine.
comment:6 by , 11 years ago
To workaround it, one can simply install downloaded packages manually:
mv /system/packages/administrative/transaction-1/* /system/packages
As a bonus, next update will work without having to do that.
comment:7 by , 11 years ago
Good point. The package daemon will fail to read the haiku_loader and thus simply ignore this package, but install the others. After rebooting you will still have to activate the new haiku_loader package.
comment:8 by , 10 years ago
I just hit that error after switching repos for Haiku and issuing "pkgman update". But since I thought it is harmless (before finding this ticket), I rebooted and thus have no syslog.
I don't understand what I need to do from comment:6 and comment:7. Won't moving the packages manually result in two haiku packages being installed? What about other packages which would have been removed if the process had worked?
comment:9 by , 10 years ago
Sorry, of course I have a syslog. Unfortunately, it contains nothing of relevance, it seems.
comment:11 by , 10 years ago
Thanks! But if there was a problem in the first place, won't that have any effect?
comment:12 by , 10 years ago
The problem is that the new haiku_loader package uses a format that isn't supported by the older Haiku yet. pkgman update
updates all or nothing and will thus fail completely due to the incompatibility. When moving the packages manually to /system/packages, the haiku_loader package will simply be skipped, since it isn't considered a valid package, and everything else will be activated. Since nothing depends on haiku_loader and the old package can load the new Haiku just fine, there won't be any problems. You'll just have to update the haiku_loader package after rebooting (manually or via pkgman update
).
comment:13 by , 10 years ago
Milestone: | R1/alpha5 → R1/beta1 |
---|
comment:14 by , 10 years ago
One of the issues I've seen is when it wants to install a package when a package of that name already exists in the packages folder. Could be triggered by updated packages without an updated revision, for example. And, as shown in the original bug report, also the settings folder.
The package_daemon needs to be a bit smarter and more robust with this occurrence, likely automatically uninstalling the conflicting packages, and handling the duplicate settings folders better.
comment:15 by , 9 years ago
It went a way for a while, but I am seeing this error again in hrev 50126
comment:16 by , 6 years ago
Milestone: | R1/beta1 → Unscheduled |
---|
comment:17 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in hrev53132. The underlying errors which caused this will now be distinct and error out much sooner; individual tickets for those should now be opened.
comment:18 by , 6 years ago
Cc: | removed |
---|
comment:19 by , 5 years ago
Milestone: | Unscheduled → R1/beta2 |
---|
Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone
Just got this after a normal
pkgman update
, I didn't have to "rm -rf" any files.And it looks like the "transaction-1" directory is indeed not empty:
(I was upgrading from hrev47458 -> hrev47498.)
Making this a blocker because it stops all further use of the package management system after it fails.