From: Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Phase invariancy and exclusivity requirements
Date: Fri, 9 Nov 2007 22:40:08 +0000 [thread overview]
Message-ID: <20071109224008.7f946930@blueyonder.co.uk> (raw)
[-- 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 --]
next reply other threads:[~2007-11-09 22:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 22:40 Ciaran McCreesh [this message]
2007-11-11 19:56 ` [gentoo-dev] Phase invariancy and exclusivity requirements 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071109224008.7f946930@blueyonder.co.uk \
--to=ciaran.mccreesh@blueyonder.co.uk \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox