1 |
David Stanek posted <20050516015654.GA7890@×××××××××××××××××××××××.net>, |
2 |
excerpted below, on Sun, 15 May 2005 21:56:54 -0400: |
3 |
|
4 |
> On Sun, May 15, 2005 at 06:12:13PM -0700, John Myers wrote: |
5 |
>> On Sunday 15 May 2005 16:41, david stanek wrote: |
6 |
>> > Add an option to emerge, --backup or something similar, that will |
7 |
>> > automatically run quickpkg. |
8 |
>> |
9 |
>> If you set FEATURES="buildpkg", portage automatically makes binary |
10 |
>> packages for you. No need to add new support. |
11 |
> |
12 |
> That would build a binary package for the potentially broken package. |
13 |
> What it would need to do is build a binary package of the existing |
14 |
> merged package. So a user can recover from a botched upgrade. |
15 |
|
16 |
I think Myers' point was that if "buildpkg" is set, the system soon builds |
17 |
up a history of /multiple/ versions back of any particular package. Thus, |
18 |
if any new emerge or remerge borks the system (hmm, interesting term, |
19 |
that, particularly at this moment, but then, this isn't supposed to be a |
20 |
political list so enough of that, just a nod to the heritage...), it's |
21 |
normally fairly easy to quickly recover to a fully working system by just |
22 |
emerging the binpkg, going back as necessary to a known working version, |
23 |
taking a step back if it was a remerge and you just borked the previously |
24 |
working current version. |
25 |
|
26 |
That of course brings me to /my/ point, that buildpkg is a very useful |
27 |
thing to have, certainly with toolchain packages, even if the system is |
28 |
space or otherwise limited enough that it's not a desirable option overall. |
29 |
|
30 |
Thus, my suggestion. Why not create a second feature, toolchain-buildpkg, |
31 |
I'm calling it here for purposes of developing the suggestion, that's on |
32 |
by default, as contrasted to the normal buildpkg being off by default. |
33 |
The Gentoo Handbook would then of course be modified to cover it and |
34 |
mention why Gentoo recommends that it stay on. Portage would then always |
35 |
buildpkg anything rescue-critical, including portage itself, gcc, |
36 |
binutils, coreutils, python, etc. Don't forget glibc (which would of |
37 |
course need put in place from a LiveCD, one's "emergency" copy of the root |
38 |
partition, etc). |
39 |
|
40 |
As mentioned here, tar and bzip2 would be special cases, because while |
41 |
one can untar a package directly over the current filesystem if portage |
42 |
(or python) itself breaks, without tar and bzip2, one is somewhat hosed |
43 |
unless one uses the resources of a backup rootfs or liveCD. Perhaps |
44 |
building them static by default would be a good idea, as well as including |
45 |
them in the toolchain-buildpkg list. |
46 |
|
47 |
With such a feature, and with it on by default, another make.conf |
48 |
parameter would then be useful as well. Call it binver-depth, and set |
49 |
binver-depth=3 in make.globals. Then, when three versions of the binpkg |
50 |
are reached, it would delete the oldest one as it created a new one, thus |
51 |
leaving two presumably known working backups at all times, even if the |
52 |
newest version it just created fails. 0 would special-case to unlimited, |
53 |
of course, since we already have the feature as a toggle. As a bonus, one |
54 |
could then make the normal buildpkg feature follow binver-depth as well, |
55 |
since the code would already be there, or create two separate binver-depth |
56 |
vars so users can control toolchain binver-depth separately from normal |
57 |
binver-depth, if desired. |
58 |
|
59 |
I believe this solution has the merit of requiring the least new code, |
60 |
since we already have the normal buildpkg feature in place and tested. |
61 |
The only new code would be that to control the toolchain package option |
62 |
separate from the others, which should be easy to add, and the rotate |
63 |
functionality (or make it a cron script similar to logrotate), which would |
64 |
be nice but isn't an absolute "must". |
65 |
|
66 |
Optionally, we could simply change the default of the buildpkg feature to |
67 |
"on", along with appropriate coverage in the usual places (GWN, the forums |
68 |
and user list, the Gentoo home page, and naturally, the Gentoo Handbook, |
69 |
for new users). That wouldn't require /any/ new portage code, altho |
70 |
again, a binpkg-rotate cron script would be rather useful. |
71 |
|
72 |
-- |
73 |
Duncan - List replies preferred. No HTML msgs. |
74 |
"Every nonfree program has a lord, a master -- |
75 |
and if you use the program, he is your master." Richard Stallman in |
76 |
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html |
77 |
|
78 |
|
79 |
-- |
80 |
gentoo-dev@g.o mailing list |