What specifically are the phase invariancy and exclusivity requirements for ebuilds? Currently PMS doesn't have anything to say about this; clearly it needs to, since existing ebuilds fairly obviously do have invariancy and exclusivity requirements.
Note that we're only discussing package manager related things here. If the user manually upgrades libc / switches compiler / whatever whilst a package manager is busy, there's nothing we can do. Is the following set sufficient? Is the following set the least restrictive correct solution? * No syncing whilst anything else is going on. * Variancy is any package manager action that modifies ROOT in a way that isn't merely a simple addition of something that doesn't alter other packages. This includes any non-default pkg_(pre|post)(inst|rm), merging to ROOT and unmerging from ROOT. * As an exception, changes to DISTDIR do not count as variancy. [1] * pkg_setup does not introduce variancy. [2] * Any pkg_ function that is not the default must be run exclusively. [3] * No variancy may be introduced at any point between a package's pkg_setup run up to the point that it is merged, except for any variancy introduced by that package. * There must be no variancy between a package's pkg_setup and a package's pkg_postinst, except for any variancy introduced by that package. [1]: This allows background fetching. It means DISTDIR can be added to by other processes at any point. It doesn't mean that a package's ${A} can be nuked randomly. [2]: Because otherwise a failed install would result in a damaged system, and an install would temporarily damage a system until complete. Adding a user isn't variancy by our definition, since when combined with the exclusivity requirements it doesn't alter any part of other packages. [3]: Weird stuff happens if, for example, two package's pkg_postinsts are run at the same time, since ebuilds do no ROOT locking. I'm fairly sure the exclusivity needs to be shared amongst all pkg_ phases (think package one doing a useradd fred in pkg_setup and package two doing it in pkg_postinst). -- Ciaran McCreesh
signature.asc
Description: PGP signature