[haiku-bugs] Re: [Haiku] #12379: [Package Kit] installing two packages in the same time can fail

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Wed, 16 Sep 2015 11:35:26 -0000

#12379: [Package Kit] installing two packages in the same time can fail
--------------------------------+----------------------------
Reporter: diver | Owner: bonefish
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Kits/Package Kit | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
--------------------------------+----------------------------

Comment (by bonefish):

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
[http://cgit.haiku-

os.org/haiku/tree/src/kits/package/manager/PackageManager.cpp?id=90ec3fc16560e46e4fcaec5af93b19570eb894d6#n510
open TODO]. It is not the main error, which should have been printed
before.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12379#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: