Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: RFC: Making backwards-incompatible tree changes | a solution for GLEP 55's problem
Date: Tue, 20 Sep 2011 13:58:44
Message-Id: pan.2011.09.20.13.57.21@cox.net
In Reply to: Re: [gentoo-dev] RFC: Making backwards-incompatible tree changes | a solution for GLEP 55's problem by Pacho Ramos
1 Pacho Ramos posted on Tue, 20 Sep 2011 15:09:01 +0200 as excerpted:
2
3 > I haven't ever tried it but, what would occur if that people with really
4 > updated systems simply unpack an updated stage3 tarball in their / and,
5 > later, try to update?
6
7 I believe it was Mike that pointed me at the error in that, which once he
8 mentioned it I recognized it due to having to recover from the same
9 problem but for a different reason.[1]
10
11 The problem is that since the stage-3 untarring bypasses portage, the
12 files on the live filesystem no longer match what portage believes to be
13 installed. The filesystem right after the untarring should be functional
14 to at minimum the level of the stage tarball, but as soon as one starts
15 emerging new packages, there will be issues since the old versions won't
16 be properly removed, because the files no longer match what's in the
17 database.
18
19 FEATURES=unmerge-orphans is a dramatic help cleaning up the mess (it
20 wasn't around when I had the problem for other reasons, unfortunately),
21 but I don't believe it can or will catch everything.
22
23 There's definitely a stage-3 tarball method that works and is actually
24 the recommended method for updating real old installations, but it
25 involves using a chroot and effectively installing from scratch in the
26 chroot, then booting to it instead of the existing installation. That's
27 basically a special-case of case #5 in the Gentoo Linux Alternative
28 Installation HOWTO, installing Gentoo from an existing Linux distro[2].
29 The only bit of note is that the existing distro happens to be (an
30 outdated) Gentoo as well, instead of whatever other distro.
31
32 ---
33
34 [1] My situation was separate /, /usr and /var partitions, each with
35 backups, but ending up in a recovery situation where the backups weren't
36 in sync time-wise. Thus portage's package installation database on /var
37 was out of sync with the actual files on / and /usr. I was still finding
38 the occasional stale file triggering issues, over a year later! It's for
39 this reason that by personal policy, everything portage installs to is on
40 the same partition, along with the installed package database, so if I
41 end up using a backup of that partition, the database is by definition in
42 sync with what's installed since it's all the same backup partition.
43
44
45 [2] http://www.gentoo.org/doc/en/altinstall.xml#doc_chap5
46
47 I used this HOWTO from Mandrake back in 2004, for my original
48 Gentoo/~amd64 install. For that matter, the gentoo/amd64 32-bit chroot
49 guide is a variant on this idea as well, except that for just a 32-bit
50 chroot, the host-system kernel and services can be used, so they don't
51 need built. But I did a variant on /that/ for my netbook build image,
52 located on my main machine since it's far more powerful than the netbook,
53 and of course I built the kernel and system services for it, tho I only
54 actually ran them after installing them to the netbook.
55 --
56 Duncan - List replies preferred. No HTML msgs.
57 "Every nonfree program has a lord, a master --
58 and if you use the program, he is your master." Richard Stallman

Replies