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