Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: Re: urgent: Segfaults after synchronously emerging|downloading 30GB|burnng a DVD iso image
Date: Mon, 29 May 2006 06:16:31
Message-Id: e5e3el$49i$1@sea.gmane.org
In Reply to: Re: [gentoo-amd64] Re: urgent: Segfaults after synchronously emerging|downloading 30GB|burnng a DVD iso image by Sergio Polini
1 Sergio Polini <sp_rm_it@×××××.it> posted
2 200605281925.51615.sp_rm_it@×××××.it, excerpted below, on Sun, 28 May
3 2006 19:25:51 +0200:
4
5 > Sure, but when I used FEATURES=buildpkg, emerge --sync took a long time;
6 > i.e. after emerging I was prompted to call fixpackages and it took a
7 > loooong time.
8
9 You gotta understand what they are saying that for and act accordingly.
10
11 What happens is that sometimes packages will move from one category to
12 another, or be renamed or replaced with something of a different name.
13 When you sync the tree, portage gets a notice of the move and adjusts its
14 tracking of what you have merged (the /var/db/pkg database) to match
15 what's now in the tree. In doing so, it not only adjusts the packages
16 that moved themselves, but the dependencies.
17
18 An example would be libgif/libungif. A gif patent expired a year or two
19 ago. While it was in force, libungif provided a patent-free workaround
20 for those in locations where the libgif package wasn't legal due to the
21 patent. After it expired, there was no longer a need for a distinction,
22 as the libraries were designed to be drop-in replacements for each other,
23 only the one didn't include the patented functionality. Thus, Gentoo was
24 able to remove libungif. What they did was tell portage that libungif was
25 now libgif.
26
27 Because the libraries were drop-in replacements for each other, anything
28 that depended on libungif could now be changed to depend on libgif
29 instead. The devs did that in-tree, but portage had to adjust its
30 dependency database so it didn't get out of sync with what the tree said
31 the dependency was supposed to be.
32
33 The catch is that binpackages include copies of the ebuild used to
34 create them, and said ebuild specifies dependencies. In ordered to use
35 those packages with the updated tree, they too have to be updated. This
36 takes awhile, as you noticed, so it's not handled automatically unless you
37 have FEATURES=fixpackages set.
38
39 The key thing to realize, however, is that as long as you aren't actually
40 trying to merge those binpkgs, they are fine as they are. There's no
41 reason you have to run fixpackages every time something changes in portage
42 that asks you to, unless you are going to actually be using those binpkgs.
43
44 Further, in the event of a crash and a need to actually use those binpkgs,
45 you could use the manual untar method regardless of what the attached
46 ebuild said, because it bypasses that. If you were actually using portage
47 to do remerge the binpkg, you could run fixpackages at that point, before
48 you actually remerged anything. If you forgot to do so, it would simply
49 give you an error, which would probably get you thinking "Hey, I gotta run
50 fixpackages before this will work, as I had not yet done so."
51
52 As for the fixpackages process itself, you are absolutely correct,
53 currently stable portage (2.0.5x) takes a VERY VERY long time, because it
54 goes over EVERY SINGLE CHANGE EVER MADE EVERY SINGLE TIME YOU RUN THE
55 THING, even ones that were made the LAST time you ran fixpackages and thus
56 don't need to be made again, even ones made before you were even running
57 Gentoo, so there's no way they could ever apply to you! As such, with
58 stable portage, it's actually best NOT to run fixpackages until you have
59 to, because it redoes everything it did the last time anyway.
60
61 Fortunately, fixpackages is much smarter with the current ~arch portage
62 (2.1 release candidates ATM). With 2.1, it timestamps the last time it ran
63 fixpackages, and skips everything before that, so it only processes what
64 has changed since the last time it ran. Basically, that means that if you
65 run it every time it tells you to, it will only have the changes that
66 happened to come in with that portage sync to worry about, and it is MUCH
67 MUCH MUCH MUCH FASTER!!! Usually, it only has a couple things to change,
68 instead of going thru the probably hundreds of changes that have happened
69 since the first move portage ever had. As a result, it's actually
70 practical to add FEATURES=fixpackages now, and let portage manage it
71 automatically, as it's fast enough the sync normally takes longer than the
72 fixpackages does. You can still do manually, and skip doing it until you
73 need to remerge one of those packages, if desired, but there's really no
74 need to do so. Letting portage handle it automatically now actually makes
75 sense.
76
77 FWIW, 2.1 is targeted at stabilization for use with Gentoo 2006.1, which
78 is targeted for July. This is only one of a number of HUGE improvements
79 in 2.1, and you guys still running 2.0.5x have a lot to look forward to
80 when 2.1 goes stable! =8^) Don't forget to reread the emerge manpage,
81 the make.conf manpage, and make.conf.example when it happens, as portage
82 will keep doing things the slow old way in a number of cases, if you don't
83 properly configure it to take advantage of the new features. In
84 particular, pay attention to FEATURES=confcache (especially anyone using
85 KDE!) and FEATURES=-metadata-transfer (that one's on by default, so you
86 use - to turn it off, it's now faster to regenerate the metadata than it
87 is to transfer it, for many people). FEATURES=parallel-fetch can also be
88 useful, and FEATURES=user-fetch is something anyone who has ever wondered
89 about the security implications of exposing root to the wilds of the net
90 during the fetch phase should definitely appreciate! There's also a new
91 tool in the matching gentoolkit, also in -rc now. It's called eclean and
92 it can be used to help clean out the staleness in both $DISTDIR (the
93 portage tarball cache location) and $PKGDIR. There are also a couple
94 changes to the way emerge works. The old way still works for 2.1 but will
95 be removed later, and portage now warns you if you use the old way.
96 emerge actions (sync, metadata, fetch, etc) now want -- in front of them,
97 as emerge --sync, and a couple make.conf variables have changed their
98 name. Again, the old way will still work for now, it just generates a
99 warning, so no worries, but there will be some things that you'll need to
100 change eventually, probably before 2.2.
101
102 That make things a bit clearer, now, and buildpkg a bit more tolerable?
103 It should, as it certainly helps make buildpkg tolerable here! =8^)
104
105
106
107 --
108 Duncan - List replies preferred. No HTML msgs.
109 "Every nonfree program has a lord, a master --
110 and if you use the program, he is your master." Richard Stallman
111
112 --
113 gentoo-amd64@g.o mailing list

Replies