* [gentoo-pms] Variancy?
@ 2010-12-05 21:55 Ulrich Mueller
2010-12-05 22:06 ` Ciaran McCreesh
0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2010-12-05 21:55 UTC (permalink / raw
To: gentoo-pms
Hi,
I don't understand the following passage from section "The state of
the system between functions":
* Variancy is any package manager action that modifies either ROOT
or / in any way that isn't merely a simple addition of something
that doesn't alter other packages. This includes any non-default
call to any pkg phase function except pkg_setup, a merge of any
package or an unmerge of any package.
* As an exception, changes to DISTDIR do not count as variancy.
* The pkg_setup function may be assumed not to introduce variancy.
Thus, ebuilds must not perform variant actions in this phase.
Why is the second item needed? Changes to DISTDIR don't alter other
packages, so aren't they covered by the first item anyway? Or do I
misunderstand the first item's first sentence?
Which of the following examples count as "variancy"?
- Calling enewuser() in pkg_setup,
- Removing orphan files in pkg_setup,
- Calling pkg_pretend.
Ulrich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-pms] Variancy?
2010-12-05 21:55 [gentoo-pms] Variancy? Ulrich Mueller
@ 2010-12-05 22:06 ` Ciaran McCreesh
2010-12-05 22:13 ` Ulrich Mueller
0 siblings, 1 reply; 6+ messages in thread
From: Ciaran McCreesh @ 2010-12-05 22:06 UTC (permalink / raw
To: gentoo-pms
[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]
On Sun, 5 Dec 2010 22:55:50 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> I don't understand the following passage from section "The state of
> the system between functions":
That whole section was written before Portage got parallel jobs
support, and was based around what ebuilds were actually doing.
Portage's parallel jobs break those rules, and this has caused all
kinds of weirdness.
The implications are *supposed* to be that if you want to do parallel
builds, you build binary packages in parallel (being sure to only run
one lot of pkg_ functions at once), and then install those binary
packages (the usual way, so rerunning pkg_setup) serially.
Instead, Portage just installs directly, and has a whole load of
convoluted hacks to try to avoid breakage. These don't actually work,
but the bugs are hidden often enough that you can often go for quite a
long time before you end up screwing your system up... In particular,
Portage assumes that if a and b aren't in any way dependent upon each
other, then they're not going to do anything to / that's going to break
the other one, which isn't true.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-pms] Variancy?
2010-12-05 22:06 ` Ciaran McCreesh
@ 2010-12-05 22:13 ` Ulrich Mueller
2010-12-05 22:21 ` Ciaran McCreesh
0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2010-12-05 22:13 UTC (permalink / raw
To: Ciaran McCreesh; +Cc: gentoo-pms
>>>>> On Sun, 5 Dec 2010, Ciaran McCreesh wrote:
> That whole section was written before Portage got parallel jobs
> support, and was based around what ebuilds were actually doing.
> Portage's parallel jobs break those rules, and this has caused all
> kinds of weirdness.
> The implications are *supposed* to be that if you want to do parallel
> builds, you build binary packages in parallel (being sure to only run
> one lot of pkg_ functions at once), and then install those binary
> packages (the usual way, so rerunning pkg_setup) serially.
> Instead, Portage just installs directly, and has a whole load of
> convoluted hacks to try to avoid breakage. These don't actually work,
> but the bugs are hidden often enough that you can often go for quite a
> long time before you end up screwing your system up... In particular,
> Portage assumes that if a and b aren't in any way dependent upon each
> other, then they're not going to do anything to / that's going to break
> the other one, which isn't true.
Thank you for your quick response, but this doesn't answer my
questions:
>> Why is the second item needed? Changes to DISTDIR don't alter other
>> packages, so aren't they covered by the first item anyway? Or do I
>> misunderstand the first item's first sentence?
>> Which of the following examples count as "variancy"?
>> - Calling enewuser() in pkg_setup,
>> - Removing orphan files in pkg_setup,
>> - Calling pkg_pretend.
Ulrich
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-pms] Variancy?
2010-12-05 22:13 ` Ulrich Mueller
@ 2010-12-05 22:21 ` Ciaran McCreesh
2010-12-05 22:49 ` Ulrich Mueller
0 siblings, 1 reply; 6+ messages in thread
From: Ciaran McCreesh @ 2010-12-05 22:21 UTC (permalink / raw
To: Ulrich Mueller; +Cc: gentoo-pms
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
On Sun, 5 Dec 2010 23:13:30 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> Thank you for your quick response, but this doesn't answer my
> questions:
Well, the entire thing's irrelevant, since Portage's implementation
ignored all the careful discussion and planning that went into the
wording in PMS... But if you're thinking of fixing Portage, then...
> >> Why is the second item needed? Changes to DISTDIR don't alter other
> >> packages, so aren't they covered by the first item anyway? Or do I
> >> misunderstand the first item's first sentence?
Modifying DISTDIR's technically modifying things on /. Or at least, it
can be interpreted that way, so the clarification's needed.
> >> Which of the following examples count as "variancy"?
> >> - Calling enewuser() in pkg_setup,
That's a "simple addition of something that doesn't alter other
packages", unless you go out of your way to concoct a deliberately
perverse counterexample.
> >> - Removing orphan files in pkg_setup,
Depends upon whether doing so modifies other packages. Although, orphan
stuff is a job for pkg_preinst or pkg_postinst, not pkg_setup.
> >> - Calling pkg_pretend.
pkg_pretend's sandboxed and isn't supposed to be modifying /, so that
should be ok.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-pms] Variancy?
2010-12-05 22:21 ` Ciaran McCreesh
@ 2010-12-05 22:49 ` Ulrich Mueller
2010-12-05 22:53 ` Ciaran McCreesh
0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Mueller @ 2010-12-05 22:49 UTC (permalink / raw
To: Ciaran McCreesh; +Cc: gentoo-pms
>>>>> On Sun, 5 Dec 2010, Ciaran McCreesh wrote:
>> >> - Calling pkg_pretend.
> pkg_pretend's sandboxed and isn't supposed to be modifying /, so
> that should be ok.
Then pkg_pretend should be mentioned as a further exception (unless we
decide that the whole section should be removed):
--- ebuild-env-invariancy.tex~
+++ ebuild-env-invariancy.tex
@@ -7,8 +7,8 @@
\item Variancy is any package manager action that modifies either
\t{ROOT} or \t{/} in any way that isn't merely a simple addition of
something that doesn't alter other packages. This includes any
- non-default call to any \t{pkg} phase function except \t{pkg\_setup},
- a merge of any package or an unmerge of any package.
+ non-default call to any \t{pkg} phase function except \t{pkg\_pretend}
+ and \t{pkg\_setup}, a merge of any package or an unmerge of any package.
\item As an exception, changes to \t{DISTDIR} do not count as variancy.
\item The \t{pkg\_setup} function may be assumed not to introduce variancy.
Thus, ebuilds must not perform variant actions in this phase.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-05 22:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 21:55 [gentoo-pms] Variancy? Ulrich Mueller
2010-12-05 22:06 ` Ciaran McCreesh
2010-12-05 22:13 ` Ulrich Mueller
2010-12-05 22:21 ` Ciaran McCreesh
2010-12-05 22:49 ` Ulrich Mueller
2010-12-05 22:53 ` Ciaran McCreesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox