Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931774 - using --buildpkgonly while emerging binary packages will unpack files to /var/tmp/portage without cleaning them up
Summary: using --buildpkgonly while emerging binary packages will unpack files to /var...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-11 20:05 UTC by Artemis Everfree
Modified: 2024-05-27 19:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artemis Everfree 2024-05-11 20:05:23 UTC
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.
Comment 1 Zac Medico gentoo-dev 2024-05-12 19:17:01 UTC
It looks like we probably just need --buildpkgonly to imply --usepkg=n.
Comment 2 Artemis Everfree 2024-05-16 05:03:09 UTC
(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.
Comment 3 Artemis Everfree 2024-05-16 05:04:52 UTC
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>`?