[haiku-bugs] Re: [Haiku] #15068: [packagefs] Cannot handle package activations with identical names

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sat, 02 Jan 2021 15:24:45 -0000

#15068: [packagefs] Cannot handle package activations with identical names
----------------------------------+----------------------------------------
  Reporter:  waddlesplash         |      Owner:  bonefish
      Type:  bug                  |     Status:  new
  Priority:  high                 |  Milestone:  R1/beta3
 Component:  File                 |    Version:  R1/Development
  Systems/packagefs               |
Resolution:                       |   Keywords:
Blocked By:                       |   Blocking:  13574, 15207, 15576, 16573
  Platform:  All                  |
----------------------------------+----------------------------------------
Comment (by stippi):

 Replying to [comment:20 pulkomandy]:

I guess packagefs is right to complain that another package with the
 same name is activated, but should notice that it is going to be replaced?

 The "Name in use" error, as far as I can tell, is from the FS layer. So
 this shouldn't be about updating a package with the "same name", the issue
 is replacing a package file with an identical copy from a new transaction.

I guess one option is to make sure the "change activation" request sent
 to packagefs has the disabling of the old package first, and enabling of
 the new one only after that? Or it should be a "reactivate package"
 instead of an "activate package"? In which case the linked code for
 packagefs would be ok, and the problem would be in the package daemon
 instead. And indeed the daemon does activation first, then deactivation,
 and never uses the "reactivate package" code.

 I am not sure this has anything to do with packagefs. The error I saw is
 from the package server, which is responsible for committing one
 transaction at a time only (among other things). I think there may be
 other situations why a package file exists already in the packages folder,
 but one situation how this can form is when there are two concurrent
 transactions started, both of which depend on the same missing package. So
 it will be part of both transactions, one of them will be committed first,
 so the package file will be present at the time the second transactions is
 committed.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15068#comment:24>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: