1 |
On 29/07/2013 16:56, Mick wrote: |
2 |
> On Monday 29 Jul 2013 13:07:44 Dale wrote: |
3 |
>> Nikos Chantziaras wrote: |
4 |
>>> On 29/07/13 14:35, Neil Bothwick wrote: |
5 |
>>>> On Mon, 29 Jul 2013 14:18:03 +0300, Nikos Chantziaras wrote: |
6 |
>>>>> Normally, when I'm about to update an important package, I back it up |
7 |
>>>>> first using quickpkg. I'm often in a situation though where many |
8 |
>>>>> important packages are being updated in a world update. Normally, I |
9 |
>>>>> have to manually quickpkg every one of them. |
10 |
>>>>> |
11 |
>>>>> Is there a way to tell emerge to do this on its own? That is, create |
12 |
>>>>> binary packages of every package that it is replacing? |
13 |
>>>> |
14 |
>>>> You could parse the emerge output to build a list of packages and pass |
15 |
>>>> that to quickpkg. You could even do his as a script |
16 |
>>>> in /etc/portage/postsync.d to have it done automatically, but the |
17 |
>>>> simplest long term solution is to add buildpkg to FEATURES, then you |
18 |
>>>> don't have to try to anticipate which packages you need to backup. |
19 |
>>>> |
20 |
>>>> You can process all existing packages with |
21 |
>>>> |
22 |
>>>> quickpkg \*/\* |
23 |
>>>> |
24 |
>>>> I suspect you could also do this be defining a custom src_setup function |
25 |
>>>> in /etc/portage/bashrc - FEATURES="buildpkg" is a lot less hassle unless |
26 |
>>>> you are really tight on disk space. |
27 |
>>> |
28 |
>>> Too big a hammer. I suppose the answer is just "no." I was hoping |
29 |
>>> for some obscure emerge option that I wasn't seeing (happened before), |
30 |
>>> like "--buildpkg-replaced" or something. I'll keep using quickpkg |
31 |
>>> then. I only need this very rarely. |
32 |
>> |
33 |
>> If you set buildpkg in make.conf, you should already have a binary |
34 |
>> stored. Example. You do a install with buildpkg in make.conf. From |
35 |
>> that point on, when you do a update or new package install it stores a |
36 |
>> binary package for everything. Then later on if you do a update and it |
37 |
>> goes goofy, you can just use the -K option and it will restore the |
38 |
>> binary it stored without compiling the package again. |
39 |
>> |
40 |
>> I have that set here and it should do what you want in the long run. It |
41 |
>> just does it differently. |
42 |
>> |
43 |
>> Dale |
44 |
> |
45 |
> It's been so long since I've used this feature I forgot how binary packages |
46 |
> are purged. Do they stay in $PKGDIR for ever, until something like eclean |
47 |
> deals with them, or can you specify (where?) to only keep the last n versions? |
48 |
> |
49 |
|
50 |
2 easy methods: |
51 |
|
52 |
rm |
53 |
eclean packages |
54 |
|
55 |
eclean works the same as for distfiles, it can delete binpkgs that are |
56 |
no longer in the tree, that you don't have installed, or all previous |
57 |
versions of what you do have installed. |
58 |
|
59 |
But they never automagically get purged, the admin has to do it |
60 |
(manually or by cron or whatever0 |
61 |
|
62 |
-- |
63 |
Alan McKinnon |
64 |
alan.mckinnon@×××××.com |