Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670482 - FEATURES=getbinpkg from make.conf overrides emerge command-line argument (--getbinpkg=n)
Summary: FEATURES=getbinpkg from make.conf overrides emerge command-line argument (--g...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-06 11:59 UTC by Martin Kletzander
Modified: 2025-05-05 07:26 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 Martin Kletzander 2018-11-06 11:59:16 UTC
When having FEATURES=getbinpkg in /etc/portage/make.conf using --getbinpkg=n in the command line for emerge doesn't change anything.

Reproducible: Always

Steps to Reproduce:
1. Have a bin package
2. Set FEATURES=getbinpkg in /etc/portage/make.conf
3. Try rebuilding the package with 'emerge --getbinpkg=n'
Actual Results:  
Installs the old bin package.

Expected Results:  
Rebuilds the package.

My guess is that getbinpkg needs similar treatment as buildpkg here:

https://github.com/gentoo/portage/blob/2e87bfaabd0550f0b34556470b28906d30bd5e48/lib/_emerge/actions.py#L2284
Comment 1 tuxway+gentoo 2025-05-03 13:42:11 UTC
Just as side note because I stumbled across this:

The behavior seems to be also described differently in the wiki:

Binary package guide (https://wiki.gentoo.org/wiki/Binary_package_guide#Installing_binary_packages):

```
There is a Portage feature that forces emerge to always try to fetch files from the binary package host:

FILE /etc/portage/make.conf Enabling getbinpkg in the FEATURES variable
FEATURES="getbinpkg"

Note that this is not equivalent to --getbinpkg (-g) in the EMERGE_DEFAULT_OPTS variable. Especially, --getbinpkg=n on the command line won't override the feature.
```

Gentoo binary host quickstart (https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart#Configure_Portage_to_use_binary_packages_by_default):

```
To automatically download and use a binary package when a suitable one is available on the servers, enable the getbinpkg Portage feature:

FILE /etc/portage/make.conf
FEATURES="getbinpkg"

If no suitable binary package can be found, the package will be compiled from source as usual. This is equivalent to adding --getbinpkg to EMERGE_DEFAULT_OPTS in /etc/portage/make.conf or to the emerge command line.
```
Comment 2 Martin Kletzander 2025-05-05 07:23:42 UTC
Now that wiki makes sense, but when I created this BZ (which I completely forgot about) there was this in the article:

    There is a Portage feature that automatically implements the equivalent of --getbinpkg (-g) without the need for updating the EMERGE_DEFAULT_OPTS variable with the --getbinpkg value:

    FILE /etc/portage/make.confEnabling getbinpkg in the FEATURES variable:
    FEATURES="getbinpkg"

So I guess this can be closed since it was fixed in December 2024:

https://wiki.gentoo.org/index.php?title=Binary_package_guide&diff=1322698&oldid=1317386

Although it's still a bit unclear when not reading the wiki, just going through the manual pages.  But I'm fine with that staying the way it is.
Comment 3 Martin Kletzander 2025-05-05 07:26:20 UTC
And to your second part (sorry, I replied only to the first one) it's not factually incorrect.  It will cause the same behaviour (-g and FEATURES=getbinpkg), but the feature has more priority and cannot be disabled per invocation.