On Mon, 19 Feb 2018 12:55:08 +0000 (UTC)
Holger Hoffstätte <hol...@applied-asynchrony.com> wrote:

> Hey,
> I'm not exactly new to portage, but one thing that I cannot seem to
> figure out is how to rebuild all dependants of a package. Not
> *dependencies*, dependants: packages that require said package.
> As a recent example: whenever go (the language) is updated to a new
> version (say from 1.9 to 1.10, as it happended recently), I'd like to
> rebuild docker & friends - or more specifically 'things that are
> compiled with go'.
> The --changed-deps option doesn't seem to do the trick, so instead I
> manually do a -vp --depclean on go and manually --oneshot all
> installed packages that have their hands on it. This is obviously
> stupid and error-prone.
> Am I missing something or is this really not easily possible?
> Basically I'm looking for a hard --oneshot --revdep-rebuild with a
> package argument.
> thanks,
> Holger

I never needed this, so I don't know how to do it directly with emerge
(is it possible?), but you can use equery like this to get a list:

equery -q d dev-lang/go

-q/--quiet (minimal output)
(d)epends (list all packages directly depending on ATOM)

to get a list of packages installed which depend on dev-lang/go
you can filter versions out of it and feed that to 'emerge -av1'.

Or if you trust this ugly one-liner without filtering (probably ugliest
thing, but seems to do the job):

emerge -av1 $(for i in $(equery -q d sys-apps/util-linux); do echo
"=$i"; done)

Reply via email to