On 19/02/2018 14:55, Holger Hoffstätte wrote:
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
There isn't really a one-shot way to do this easily. Ebuilds do not
contain dependants, they contain dependencies and that is a one-way
arrow. So you end up having to walk the tree to get the information you
If you have to do it, your example will suffice. Crude, but works.
I have to question though why you think you need to do this. If you want
to do it ad-hoc without needing a good reason, then do the above. If you
think that stuff must be rebuilt when go is bumped, then you are not
correct. ebuilds have sub-slot dependencies which you can think of as
somewhat like ABI/API version tracking, not package tracking. If go is
rebuilt and the ABI/API changes, emerge notices and rebuilds packages
that were using the old go. If a go-using package is compatible with the
chnage, it is not rebuilt because it does not need to be rebuilt and the
runtime linker deals with what happens at runtime. If portage misses
something in this, that is a bug and the ebuild needs updating.
Perhaps you should lay out clearly why you think you need to do this, so
everyone else can help match your expectations to reality :-)