1 |
On Mon, 19 Feb 2018 15:29:52 +0100, Branko Grubic wrote: |
2 |
|
3 |
> On Mon, 19 Feb 2018 12:55:08 +0000 (UTC) |
4 |
> Holger Hoffstätte <holger@××××××××××××××××××.com> wrote: |
5 |
> |
6 |
>> Hey, |
7 |
>> |
8 |
>> I'm not exactly new to portage, but one thing that I cannot seem to |
9 |
>> figure out is how to rebuild all dependants of a package. Not |
10 |
>> *dependencies*, dependants: packages that require said package. |
11 |
>> |
12 |
>> As a recent example: whenever go (the language) is updated to a new |
13 |
>> version (say from 1.9 to 1.10, as it happended recently), I'd like to |
14 |
>> rebuild docker & friends - or more specifically 'things that are |
15 |
>> compiled with go'. |
16 |
>> |
17 |
>> The --changed-deps option doesn't seem to do the trick, so instead I |
18 |
>> manually do a -vp --depclean on go and manually --oneshot all |
19 |
>> installed packages that have their hands on it. This is obviously |
20 |
>> stupid and error-prone. |
21 |
>> |
22 |
>> Am I missing something or is this really not easily possible? |
23 |
>> Basically I'm looking for a hard --oneshot --revdep-rebuild with a |
24 |
>> package argument. |
25 |
>> |
26 |
>> thanks, |
27 |
>> Holger |
28 |
>> |
29 |
>> |
30 |
> |
31 |
> I never needed this, so I don't know how to do it directly with emerge |
32 |
> (is it possible?), but you can use equery like this to get a list: |
33 |
> |
34 |
> equery -q d dev-lang/go |
35 |
> |
36 |
> -q/--quiet (minimal output) |
37 |
> (d)epends (list all packages directly depending on ATOM) |
38 |
> |
39 |
> to get a list of packages installed which depend on dev-lang/go |
40 |
> you can filter versions out of it and feed that to 'emerge -av1'. |
41 |
> |
42 |
> Or if you trust this ugly one-liner without filtering (probably ugliest |
43 |
> thing, but seems to do the job): |
44 |
> |
45 |
> emerge -av1 $(for i in $(equery -q d sys-apps/util-linux); do echo |
46 |
> "=$i"; done) |
47 |
|
48 |
That was useful and saved me the time to sed & grep my way through the |
49 |
equery output. Turning this into a generic script is easy enough. |
50 |
|
51 |
Thank you very much! |
52 |
|
53 |
cheers |
54 |
Holger |