Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: News Item: OpenAFS no longer needs kernel option DEBUG_RODATA
Date: Sun, 24 Jul 2016 07:05:40
Message-Id: 20160724100523.5e72b185b9fac0334fcf08db@gentoo.org
In Reply to: [gentoo-dev] Re: News Item: OpenAFS no longer needs kernel option DEBUG_RODATA by Duncan <1i5t5.duncan@cox.net>
1 Hi,
2
3 On Sun, 24 Jul 2016 03:00:40 +0000 (UTC) Duncan wrote:
4 > Andrew Savchenko posted on Sun, 24 Jul 2016 00:30:39 +0300 as excerpted:
5 >
6 > > Do we ever had such case like multiple versions of the same
7 > > single-slotted package installed or recorded as installed in the real
8 > > world? I'm not sure even in this, but I may assume that it may happen
9 > > one day.
10 > >
11 > > Do we have any proof that PM can recover from such situation,
12 > > where VDB is a mess and installed files can also be a mess? I'm not sure
13 > > in this at all.
14 > >
15 > > Do we have any test suits for portage (as the most popular PM
16 > > implementation) for such cases? I doubt this, I can find none. I'm not
17 > > sure if such tests are implemented in other PM test suits too.
18 >
19 > Think of how a package is upgraded (by portage, I don't know enough about
20 > the others to describe the process for them). The package is built, then
21 > installed to a temporary location, then "qmerged" from the temporary
22 > location to the live filesystem, replacing the previous version's files
23 > and recording the new one in the installed-package database, then the old
24 > version is unmerged and its record removed from the installed-package
25 > database.
26 >
27 > What happens if there's a crash in either the qmerge or old-version
28 > unmerge steps?
29 >
30 > Right, now there's parts of two versions in the installed-package
31 > database, and who knows what files from each on the live filesystem.
32 >
33 > I'm not a portage dev so won't comment on the test suite angle, but
34 > portage has been able to handle this with the user simply redoing the
35 > upgrade (whether from binpkg or full rebuild) for many years now (singe
36 > before I became a gentooer in 2004, I know as I had some faulty hardware
37 > at the time and regularly crashed during build and installs, which was
38 > likely before REPLACING_VERSIONS was a thing), and given the number of
39 > installations out there and the stress of parallel-building some packages
40 > while others are installing, the code to handle this is GOING to get
41 > regularly tested.
42
43 I agree with you, but REPLACING_VERSIONS has nothing to do with
44 such recovery.
45
46 1) It appeared only in EAPI 4, approved on 2011-01-17. Recovery
47 from hardware crashes forked well long before.
48
49 2) If you will look into the tree, in the absolute majority of cases
50 REPLACING_VERSIONS is being used to determine whether informational
51 messages should be shown to a user or not. Such messages usually
52 include some upgrade hints or howtos; and REPLACING_VERSIONS check
53 is required to avoid showing them to unaffected users. It has
54 absolutely nothing to do with the error recovery done by PM itself.
55
56 3) I also had a broken hardware (faulty memory) for a few years and
57 portage and other software recovered quite fine despite numerous
58 segfaults. So I have the experience :)
59
60 Best regards,
61 Andrew Savchenko

Replies

Subject Author
Re: [gentoo-dev] Re: News Item: OpenAFS no longer needs kernel option DEBUG_RODATA Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>