On Mon, Aug 3, 2020 at 7:45 AM Peter Humphrey <pe...@prh.myzen.co.uk> wrote: > > Now, when I chroot into the rescue system and 'emerge -uaDvNk @core @base', > portage reports that it can't use the postfix package because of different USE > flags, but it does the update I've asked for. Postfix is in @apps in the main > system, but it's not installed in the rescue system.
That makes sense. -k says to use the binary if it matches, and enables --binpkg-respect-use by default. Since the USE flags don't match it ignores the binary package, but since you're using -k it does a full build. > > Moreover, if I specify -K instead of -k to emerge, it proposes to install > every package that's present in $PKGDIR. This is because -k automatically sets --binpkg-respect-use, but -K does not. So when you switch to -K it ignores your USE flag settings and just installs them. It will, however, not do any full builds. > Or, is there a way to specify 'all installed category/packages that have > usable binary packages'? At present, 'installed' is being ignored. Sounds like you want --usepkgonly y --binpkg-respect-use y (the first is the same as -K). At least, I think that is what you're getting at - I could be misunderstanding your goal. If I were less lazy I'd come up with a way for portage to have multiple binpkg files in the repo with different USE flags, and let it pick the one that matches. It seems possible using config hashes and a strategy like what is done with shared object symlinks. -- Rich