1 |
Boyd Stephen Smith Jr. posted <200512132319.29184.bss03@××××××××××.com>, |
2 |
excerpted below, on Tue, 13 Dec 2005 23:19:26 -0500: |
3 |
|
4 |
> On Tuesday 13 December 2005 10:46 pm, maillists wrote: |
5 |
>> I unmerged gcc. (long story never mind) |
6 |
>> |
7 |
>> How do I get out of the corner that I painted myself into? |
8 |
> |
9 |
> Get a binary package and install that. I believe the binary package |
10 |
> repository at chinstrap.alternating.net is still in operation. |
11 |
|
12 |
Also note that the stages and/or liveCD should have it available. I |
13 |
just confirmed here with the stage-3 686 tarball. I'd tend to prefer |
14 |
this, because it's official Gentoo, over something at some random |
15 |
URL, which might or might not be perfectly fine. |
16 |
|
17 |
You'd unpack the stage tarball somewhere suitable (preferrably NOT |
18 |
directly over your running system, that is, NOT to / itself), then chroot |
19 |
into the new root dir location, and do a /usr/sbin/quickpkg gcc to create |
20 |
a binary package out of the existing stage installation. Back out of the |
21 |
chroot, you could then emerge -K |
22 |
/path/to/unpack/location/usr/portage/package/All/gcc<tab>, the tab (twice |
23 |
if necessary) to get the specific ebuild file. |
24 |
|
25 |
That should restore a working gcc, at which point you can remerge your own |
26 |
version with your own selected USE flags and the like. |
27 |
|
28 |
.... |
29 |
|
30 |
After you have recovered, do a man make.conf, and check out |
31 |
FEATURES=buildpkg. You can use that to automatically build a binary |
32 |
package each time you emerge something, so if your toolchain ever gets |
33 |
broken again, all you have to do is emerge -K the offending package, and |
34 |
it'll remerge from the binary created at original merge time, without |
35 |
taking the time to recompile! |
36 |
|
37 |
Total additional disk space required to store a complete system's worth of |
38 |
binary packages will be 2-4 gigs. Note that you'll want to clean out old |
39 |
versions of packages once in awhile. There's a tool called eclean that |
40 |
helps with this, in at least the latest ~arch versions of gentoolkit. tho |
41 |
I'm not sure it has made its way into stable just yet. |
42 |
|
43 |
Of course, if you hose portage itself, emerging the binary portage package |
44 |
becomes rather difficult. However, for such situations, one can use the |
45 |
procedure found in $PORTDIR/sys-apps/portage/files/README.RESCUE, only |
46 |
you'll already have the binary package from when you merged it, so you |
47 |
be able to skip the suggested download step. A problem with your |
48 |
installed python would be similar, since portage requires python to run |
49 |
correctly. |
50 |
|
51 |
Using these techniques on a system that has been running FEATURES=buildpkg |
52 |
for long enough to have binpkg versions of all your critical packages, you |
53 |
should be able to recover from a problem with any package, as long as you |
54 |
have a liveCD rescue boot disk handy in case you can't boot. If you want |
55 |
to jumpstart the binpkg collection, you can use quickpkg to create a |
56 |
binary package for anything currently merged. Naturally, I'd suggest you |
57 |
start with the packages in the list you get with emerge --pretend |
58 |
--emptytree system, or if you don't want to do that, at least do gcc, |
59 |
glibc, binutils, portage, python, etc. You may also want to preemptively |
60 |
quickpkg anything that takes quite a while to merge, such as xorg, and |
61 |
especially OOo, if you have it merged and used the from-source version. |
62 |
|
63 |
-- |
64 |
Duncan - List replies preferred. No HTML msgs. |
65 |
"Every nonfree program has a lord, a master -- |
66 |
and if you use the program, he is your master." Richard Stallman in |
67 |
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html |
68 |
|
69 |
|
70 |
-- |
71 |
gentoo-desktop@g.o mailing list |