public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Phase invariancy and exclusivity requirements
@ 2007-11-09 22:40 Ciaran McCreesh
  2007-11-11 19:56 ` Ciaran McCreesh
  0 siblings, 1 reply; 6+ messages in thread
From: Ciaran McCreesh @ 2007-11-09 22:40 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2164 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-11-13 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-09 22:40 [gentoo-dev] Phase invariancy and exclusivity requirements Ciaran McCreesh
2007-11-11 19:56 ` Ciaran McCreesh
2007-11-12 12:26   ` Marijn Schouten (hkBst)
2007-11-12 13:31     ` Piotr Jaroszyński
2007-11-12 13:33     ` Fernando J. Pereda
2007-11-13 15:44     ` Ciaran McCreesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox