Gentoo Archives: gentoo-user

From: Branko Grubic <bitlord0xff@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Rebuilding all dependants of a package
Date: Mon, 19 Feb 2018 14:31:10
Message-Id: 20180219152952.60dbbb21@quad.linux.gnu
In Reply to: [gentoo-user] Rebuilding all dependants of a package by "Holger Hoffstätte"
1 On Mon, 19 Feb 2018 12:55:08 +0000 (UTC)
2 Holger Hoffstätte <holger@××××××××××××××××××.com> wrote:
3
4 > Hey,
5 >
6 > I'm not exactly new to portage, but one thing that I cannot seem to
7 > figure out is how to rebuild all dependants of a package. Not
8 > *dependencies*, dependants: packages that require said package.
9 >
10 > As a recent example: whenever go (the language) is updated to a new
11 > version (say from 1.9 to 1.10, as it happended recently), I'd like to
12 > rebuild docker & friends - or more specifically 'things that are
13 > compiled with go'.
14 >
15 > The --changed-deps option doesn't seem to do the trick, so instead I
16 > manually do a -vp --depclean on go and manually --oneshot all
17 > installed packages that have their hands on it. This is obviously
18 > stupid and error-prone.
19 >
20 > Am I missing something or is this really not easily possible?
21 > Basically I'm looking for a hard --oneshot --revdep-rebuild with a
22 > package argument.
23 >
24 > thanks,
25 > Holger
26 >
27 >
28
29 I never needed this, so I don't know how to do it directly with emerge
30 (is it possible?), but you can use equery like this to get a list:
31
32 equery -q d dev-lang/go
33
34 -q/--quiet (minimal output)
35 (d)epends (list all packages directly depending on ATOM)
36
37 to get a list of packages installed which depend on dev-lang/go
38 you can filter versions out of it and feed that to 'emerge -av1'.
39
40 Or if you trust this ugly one-liner without filtering (probably ugliest
41 thing, but seems to do the job):
42
43 emerge -av1 $(for i in $(equery -q d sys-apps/util-linux); do echo
44 "=$i"; done)

Replies

Subject Author
[gentoo-user] Re: Rebuilding all dependants of a package "Holger Hoffstätte" <holger@××××××××××××××××××.com>