The scenario: I run an emptytree with buildpkgonly: emerge -e --buildpkgonly I also have installing binaries enabled on this system via FEATURES="getbinpkg" I had about 50% of my packages already built as binaries and the remaining not, so my goal here was to build binaries for the remaining packages that I did not have already in binary form. So what happened? As one might expect, all packages were added to the list of packages to install, binary and not, because this is an empty tree. While installing them, binaries still go through the extract phase, but they do not go through any other phase: >>> Emerging binary (104 of 2247) sci-electronics/electronics-menu-1.0-r1::gentoo * electronics-menu-1.0-r1-1.gpkg.tar MD5 SHA1 size ;-) ... [ ok ] >>> Extracting info >>> Extracting sci-electronics/electronics-menu-1.0-r1 >>> Emerging binary (105 of 2247) net-wireless/wireless-regdb-20220606::gentoo * wireless-regdb-20220606-1.gpkg.tar MD5 SHA1 size ;-) ... [ ok ] >>> Extracting info >>> Extracting net-wireless/wireless-regdb-20220606 >>> Emerging binary (106 of 2247) dev-libs/mathjax-2.7.7-r1::gentoo * mathjax-2.7.7-r1-1.gpkg.tar MD5 SHA1 size ;-) ... [ ok ] >>> Extracting info >>> Extracting dev-libs/mathjax-2.7.7-r As a consequence of this, packages which are already in binary form have their contents extracted into /var/tmp/portage and then just left there, because no other phase runs to remove them. /var/tmp/portage slowly fills up with this data. What I would expect instead is one of two things: 1. Because this is --buildpkgonly, do not even extract packages that are already in binary form. skip processing them entirely. This seems the most obvious to me 2. *or*, if that is not feasible or doesnt make sense for some reason, the files should at least be deleted from /var/tmp/portage after being extracted instead of left there.
It looks like we probably just need --buildpkgonly to imply --usepkg=n.
(In reply to Zac Medico from comment #1) > It looks like we probably just need --buildpkgonly to imply --usepkg=n. I gave --buildpkgonly --usepkg=n a try on my local system and did not see any change in behavior.
If it did have an effect though- would it in theory preserve the behavior of only building packages that do not already have a binary? (which is the thing I am trying to do in particular). Or would I need to query the system for packages that already have no built binaries and, instead of --emptytree, do like a `emerge -1 <all the packages with no binaries yet>`?