Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: About trying to prevent downgrades of packages that cause system breakage
Date: Sun, 01 Jul 2012 07:21:42
Message-Id: pan.2012.07.01.07.20.08@cox.net
In Reply to: Re: [gentoo-dev] About trying to prevent downgrades of packages that cause system breakage by Mike Frysinger
1 Mike Frysinger posted on Sat, 30 Jun 2012 11:16:51 -0400 as excerpted:
2
3 > On Saturday 30 June 2012 07:22:39 Zac Medico wrote:
4 >> On 06/30/2012 04:07 AM, Pacho Ramos wrote:
5 >> > I would like to discuss a bit more issues like:
6 >> > https://bugs.gentoo.org/show_bug.cgi?id=423087
7 >> >
8 >> > Even if there are "a lot" of packages that can cause this breakage
9 >> > when downgraded, I think it should be prevented and package managers
10 >> > shouldn't try to downgrade this kind of packages as they will later
11 >> > cause a total breakage. People is not supposed to know that
12 >> > downgrading some package system will, for example, have an unusable
13 >> > gcc.
14 >>
15 >> It seems like a die in pkg_pretend would serve pretty well.
16 >
17 > doing it on a per-ebuild basis doesn't make much sense. a simple
18 > version compare (like we do in glibc as an exception to this rule
19 > because of its much wider implication) is incorrect: the new version
20 > might not introduce any new symbols compared to the old one, and even if
21 > it has, other packages might not have been linked against the new
22 > symbols.
23
24 glibc was the example that popped up in my mind as well. Two comments:
25
26 * Please make sure there's an override in case the user needs it, like
27 glibc has.
28
29 * Glibc's override is unfortunately broken in one specific case: binpkgs.
30 The binpkg must have been built with the override (I_KNOW_WHAT_IM_DOING=1
31 or whatever) set, or it won't work.
32
33 I found this out the hard way, when I upgraded a glibc and immediately
34 found it broken for something or other. I hadn't rebuilt anything else
35 yet (I try to do glibc upgrades by themselves, /because/ of their
36 critical nature), so everything was still built against the old glibc and
37 there would have been no breakage. Since I run FEATURES=buildpkg by
38 default, I thought "no problem, I'll just emerge the old binpkg."
39 WRONG! Because it wasn't built with the override variable set, it
40 wouldn't let me downgrade using the binpkg!
41
42 But whatever breakage I had wasn't letting me rebuild, either!
43
44 Which is exactly why I have multiple bootable rootfs (with everything
45 portage installs on it) setup, so I can boot into a bakup root if my
46 normal working one gets hosed, somehow. So I just booted into it,
47 mounted my normal working rootfs, set ROOT= to point to it, and went from
48 there.
49
50 It would be MUCH easier if a glibc binpkg downgrade could look only at
51 the existing portage environment for that variable, not check the one in
52 the binpkg!
53
54 --
55 Duncan - List replies preferred. No HTML msgs.
56 "Every nonfree program has a lord, a master --
57 and if you use the program, he is your master." Richard Stallman

Replies