1 |
Michael George <george@××××××××××.com> posted |
2 |
20070103030310.GA3184@××××××××××××.office, excerpted below, on Tue, 02 |
3 |
Jan 2007 22:03:10 -0500: |
4 |
|
5 |
> I'm updating my system with my normal CHROOT method where I update all |
6 |
> teh packages in a CHROOT and then make packages of them for my real |
7 |
> system. |
8 |
> |
9 |
> For the first time, I am doing this to my amd64 system rather than my |
10 |
> x86 system, and I've had a couple glitches. |
11 |
> |
12 |
> Because /lib and /usr/lib are symlinked to /lib64 and /usr/lib64, the |
13 |
> packages I made in my CHROOT won't extract correctly. It will get to |
14 |
> extracting /lib (or /usr/lib), which is a symlink, and it cannot create |
15 |
> the next level of directories within it because the referenced directory |
16 |
> doesn't exist where the package is being extracted. |
17 |
> |
18 |
> Am I doing something wrong in creating the packages, or in extracting |
19 |
> them? |
20 |
|
21 |
Have you tried FEATURES=buildpkg ? That would seem to be what you are |
22 |
after, and should avoid the system-specific aspects of doing it |
23 |
after-the-fact with quickpkg. |
24 |
|
25 |
The issue is that since quickpkg uses what's actually on the system (or in |
26 |
the root) the package is created on, it will by definition include certain |
27 |
system-specific aspects in the packages as built. Among these are |
28 |
system-specific configuration details such as customized config files and |
29 |
system dirs vs. symlinks. |
30 |
|
31 |
FEATURES=buildpkg is designed to avoid the system-specific aspects |
32 |
while still retaining build flag and USE flag aspects, by binpkging the |
33 |
image as it is fake-installed directly into the temporary image |
34 |
post-install pre-qmerge stage (see the ebuild (1) manpage if you aren't |
35 |
familiar with ebuild stages). Thus, it is the package as it was built, |
36 |
pre-system-specific-configuration, since it's before qmerge and therefore |
37 |
before etc-update. It's also as fake-installed to the temporary location, |
38 |
so the only symlinks included should be the symlinks in the actual |
39 |
package, not anything from the system it's merged to, as will unavoidably |
40 |
be the case with quickpkg. |
41 |
|
42 |
FEATURES=buildpkg also tests the binary package by actually merging from |
43 |
the tarball instead of qmerging from the fake-install image. While that |
44 |
test is by necessity on the system that just built the package, thus not |
45 |
catching all system-specific dependency problems, it at least demonstrates |
46 |
that the created binpkg can be successfully merged under the right |
47 |
conditions, a test missing entirely from the quickpkg method. |
48 |
|
49 |
quickpkg is really designed as a way to avoid a recompile if one is |
50 |
testing an unmerge or upgrade one isn't sure about, in the case the test |
51 |
upgrade does indeed prove unstable or the unmerge ill advised, thus |
52 |
avoiding having to recompile the package you just had merged before the |
53 |
test. While it /can/ be used to transfer packages between systems, thus |
54 |
avoiding the recompile on the other system, that isn't its main intent, |
55 |
and there are certain occasional issues that have to be resolved manually |
56 |
as a result when it is used in that manner. |
57 |
|
58 |
If one is going to be doing routine package transfers as a matter of |
59 |
course, it's therefore far better to use FEATURES=buildpkg, avoiding at |
60 |
least /some/ of the problems. The problems that FEATURES=buildpkg doesn't |
61 |
resolve technically, and there are a number of them that remain as current |
62 |
limitations of the way portage itself functions, Gentoo devs usually |
63 |
nullify thru other means. Very occasionally, there will be a bug or two |
64 |
with a FEATURES=buildpkg built package merging, but where there is, it |
65 |
should be reported (at bugs.gentoo.org, be sure to search and see if |
66 |
the bug has already been filed by someon else) as exactly that, and it |
67 |
should be fixed eventually and if it'll take awhile, the Gentoo package |
68 |
maintainer or portage devs will often provide a workaround to get you |
69 |
moving again. |
70 |
|
71 |
BTW, I recommend FEATURES=buildpkg as one of the poorest advertised |
72 |
"power" features of portage, even for users with only a single |
73 |
installation. The backups it provides certainly simplifies routine |
74 |
sysadmin chores and troubleshooting in a number of ways. Among others, |
75 |
it's /tremendously/ easier to recover from a borked gcc or portage or |
76 |
python, in addition to the fact that it becomes a matter of five or ten |
77 |
minutes' work to merge a different version of a package once you have |
78 |
several binpkged versions available, to see if a particular problem is |
79 |
with one version or all of them. Since the original as-merged version of |
80 |
any file is saved in the binpkg, it's also extremely easy to compare a |
81 |
config file as it currently exists on the system to what was originally |
82 |
merged. As I said, truly an under-appreciated and therefore underutilized |
83 |
power-feature of portage! |
84 |
|
85 |
FWIW, I keep my binpkgs on a dedicated partition, 4 gig sized for plenty |
86 |
of room tho I had it on a 2 gig partition previously. The actual size of |
87 |
a full operating set of merged packages, binpkged, is somewhere around |
88 |
half a gig, here, I'd guess, but as I said, it's convenient to keep |
89 |
several versions of packages around, and while portage now includes the |
90 |
eclean tool to help manage the packages and distdir dirs, one doesn't want |
91 |
to have to clean them out all /that/ often, so over 2 gigs is recommended, |
92 |
with my 4 gig being plenty and to spare, so I'd say 3 gigs. |
93 |
|
94 |
-- |
95 |
Duncan - List replies preferred. No HTML msgs. |
96 |
"Every nonfree program has a lord, a master -- |
97 |
and if you use the program, he is your master." Richard Stallman |
98 |
|
99 |
-- |
100 |
gentoo-amd64@g.o mailing list |