Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 695460 - sys-apps/portage: emerge -1kB unpacks binpackages to tempdir and exits
Summary: sys-apps/portage: emerge -1kB unpacks binpackages to tempdir and exits
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-23 16:02 UTC by Michał Górny
Modified: 2019-09-23 21:25 UTC (History)
0 users

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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-09-23 16:02:41 UTC
# emerge -1vkB vorbis-tools

These are the packages that would be built, in order:

Calculating dependencies... done!
[binary  N     ] media-libs/libkate-0.4.1-r3-1::gentoo  USE="-debug -doc -wxwidgets" ABI_X86="32 64 -x32" PYTHON_TARGETS="python2_7" 0 KiB
[binary  N     ] media-sound/vorbis-tools-1.4.0-r5-1::gentoo  USE="flac kate nls ogg123 speex" 0 KiB

Total: 2 packages (2 new, 2 binaries), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] 

>>> Emerging binary (1 of 2) media-libs/libkate-0.4.1-r3::gentoo
 * libkate-0.4.1-r3-1.xpak MD5 SHA1 size ;-) ...                         [ ok ]
>>> Extracting info
>>> Extracting media-libs/libkate-0.4.1-r3

>>> Emerging binary (2 of 2) media-sound/vorbis-tools-1.4.0-r5::gentoo
 * vorbis-tools-1.4.0-r5-1.xpak MD5 SHA1 size ;-) ...                    [ ok ]
>>> Extracting info
>>> Extracting media-sound/vorbis-tools-1.4.0-r5


Sure, I guess there's no useful result to be expected there but unpacking binpackages and leaving them in ${PORTAGE_TMPDIR} is not something I'd expect.
Comment 1 Mike Gilbert gentoo-dev 2019-09-23 18:13:57 UTC
I wonder if passing --buildpkgonly should disable --usepkg and --usepkgonly, or if emerge should just immediately exit with an error message given this combination of flags.
Comment 2 Zac Medico gentoo-dev 2019-09-23 21:05:31 UTC
It doesn't clean ${PORTAGE_TMPDIR} because that normally happens after merge and the packages are never merged in --buildpkgonly mode.
Comment 3 Zac Medico gentoo-dev 2019-09-23 21:25:50 UTC
(In reply to Mike Gilbert from comment #1)
> I wonder if passing --buildpkgonly should disable --usepkg and --usepkgonly,
> or if emerge should just immediately exit with an error message given this
> combination of flags.

--usepkgonly should definitely be an error, but --usepkg or --getbinpkg in EMERGE_DEFAULT_OPTS could be tolerated as long as we make them moot like this:

> diff --git a/lib/_emerge/depgraph.py b/lib/_emerge/depgraph.py
> index 51614fc14..17559ca84 100644
> --- a/lib/_emerge/depgraph.py
> +++ b/lib/_emerge/depgraph.py
> @@ -573,7 +573,8 @@ class _dynamic_depgraph_config(object):
>                                         db_keys = list(portdb._aux_cache_keys)
>                                         dbs.append((portdb, "ebuild", False, False, db_keys))
>  
> -                               if "--usepkg" in depgraph._frozen_config.myopts:
> +                               if ("--usepkg" in depgraph._frozen_config.myopts and
> +                                       "--buildpkgonly" not in depgraph._frozen_config.myopts):
>                                         bindb  = depgraph._frozen_config.trees[myroot]["bintree"].dbapi
>                                         db_keys = list(bindb._aux_cache_keys)
>                                         dbs.append((bindb,  "binary", True, False, db_keys))