Opened 9 years ago

Last modified 3 years ago

#12379 new bug

[Package Kit] installing two packages in the same time can fail

Reported by: diver Owned by: bonefish
Priority: normal Milestone: Unscheduled
Component: Kits/Package Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev49636.

While pkgman install qupzilla_x86 (which also pulled libqt4) I decided to pkgman install droid in another tab. While droid fonts installed just fine pkgman failed to install qupzilla package because directory wasn't empty (can't recall an exact error).

Change History (4)

comment:1 by bonefish, 9 years ago

It is actually expected that one cannot do two installations at the same time. At least ATM. Other systems simply don't allow to start a second installation (or even to open the package manager) while one is in progress (e.g. using a global lock).

Haiku's package kit uses transactions. The client side prepares a transaction -- multiple clients can do that concurrently -- and when committed they are processed sequentially in the package daemon. If a transaction was prepared against an older state of the installation directories, the package daemon rejects it. The client could then re-prepare it and commit it again. If no user interaction is necessary (i.e. no problems with solutions to pick) that would be simple. Otherwise the client would have to check whether the same problems occur (with the same solutions) and reuse those or ask the user again. However, that whole part isn't implemented yet and the client simply always aborts when the package daemon rejects a transaction due to it being out of date.

The "directory not empty" error message is just a consequence of an open TODO. It is not the main error, which should have been printed before.

comment:2 by waddlesplash, 5 years ago

Now that errors will be printed properly after hrev53132, please retest this and see what the actual problem is.

comment:3 by diver, 5 years ago

*** failed to commit transaction: The transaction is out of date.

comment:4 by diver, 3 years ago

Still here in hrev55001.

Note: See TracTickets for help on using tickets.