Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 463964 - FEATURES=getbinpkg can not be overriden in /etc/portage/package.env
Summary: FEATURES=getbinpkg can not be overriden in /etc/portage/package.env
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Binary packages support (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 337456
Blocks: 377365 924772
  Show dependency tree
 
Reported: 2013-03-31 07:01 UTC by catageek
Modified: 2024-03-26 12:18 UTC (History)
13 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 catageek 2013-03-31 07:01:51 UTC
When trying to override some variables in package.env, emerge does not take them into account.

To reproduce the bug:
1) echo media-gfx/imagemagick binpkg.conf >> /etc/portage/package.env
2) echo 'FEATURES="${FEATURES} getbinpkg"' >> /etc/portage/env/binpkg.conf
3) emerge --info imagemagick

Output:
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"

Expected result:
FEATURES should contain getbinpkg

Analysis:
Execution in strace shows that emerge opens /etc/portage/env/binpkg.conf at the very end of execution, after FEATURES (and many other variables) are already defined.

Solution:
emerge should read files in /etc/portage/env earlier in the execution.


emerge --info output:

Portage 2.1.11.55 (default/linux/amd64/13.0/desktop, gcc-4.6.3, glibc-2.15-r3, 3.7.9-gentoo20130310 x86_64)
=================================================================
System uname: Linux-3.7.9-gentoo20130310-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.1
KiB Mem:     2050972 total,     44452 free
KiB Swap:    3012112 total,   2777964 free
Timestamp of tree: Sat, 30 Mar 2013 17:00:01 +0000
ld GNU ld (GNU Binutils) 2.22
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     1.3.7-r1, 2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.1.3-r1, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r2, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo bitcoin x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -ftracer -pipe -O2 -funroll-all-loops -ftree-vectorize -fpeel-loops -funswitch-loops -funit-at-a-time"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -ftracer -pipe -O2 -funroll-all-loops -ftree-vectorize -fpeel-loops -funswitch-loops -funit-at-a-time"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org ftp://mirror.ovh.net/gentoo-distfiles"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude='/tmp' --exclude='/packages_dell' --exclude='/ccache'"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/usr/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 branding bzip2 cairo cdda cdr cli consolekit consolokit cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran iconv ipv6 jpeg kde kdeenablefinal lcms libnotify mad mailwrapper mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib nls nptl nptlonly ogg opengl openmp pam pango pcre pdf pic policykit ppds qt3support qt4 readline scanner session sse sse2 startup-notification svg tcltk tiff truetype udev udisks unicode upower usb wxwidgets x264 xcb xcomposite xml xv xvid" ABI_X86="64" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="dmix dsnoop plug asym softvol ladspa route" APACHE2_MODULES="mime authz_host dir alias autoindex" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon ptp2 samsung directory" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" NETBEANS_MODULES="ide php" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 1 Zac Medico gentoo-dev 2013-04-01 01:56:21 UTC
Currently, FEATURES=getbinpkg only works as a global setting. There are other FEATURES settings that can be successfully overridden via package.env, such as buildpkg, splitdebug, and installsources.
Comment 2 Mehmet Giritli 2013-09-30 07:38:05 UTC
(In reply to Zac Medico from comment #1)
> Currently, FEATURES=getbinpkg only works as a global setting. There are
> other FEATURES settings that can be successfully overridden via package.env,
> such as buildpkg, splitdebug, and installsources.

What about PYTHON_SINGLE_TARGET?
Comment 3 Stefan Wimmer 2014-01-14 00:55:40 UTC
Are there any plans to change that behaviour? I'd really like to make use of that feature for that mighty libreoffice package that should not be compiled on my old & weak laptops ...
Comment 4 Sergey Torokhov 2022-01-11 07:20:14 UTC
Current issue comlicates the using of binary package hosting [1] setup for individual packages.

[1]: https://dilfridge.blogspot.com/2021/09/experimental-binary-gentoo-package.html
Comment 5 Eli Schwartz 2024-01-07 08:13:09 UTC
From a recent discussion:

2023-12-29 08:51:43 AM	+ztrawhcse	I did however note in locally playing around that it doesn't seem possible to set FEATURES=-getbinpkg in package.env
2023-12-29 08:51:59 AM	+ztrawhcse	so it's not fully clear how to guarantee a specific package is locally compiled
2023-12-29 08:52:08 AM	@sam_	yes, this is an interesting question
2023-12-29 08:52:25 AM	@sam_	overall package.env support is way harder if we allow it for any atom because getbinpkg affects dependency resolution
2023-12-29 08:52:36 AM	@sam_	but supporting it to say i want a binpkg/not for a package overall is probably more doable
2023-12-29 08:54:55 AM	+ztrawhcse	possibly slot as well although I don't personally need slot support for this


I would suspect that people only really have a use case for this at the cat/pkg level anyway, so limiting it to this is probably fine.
Comment 6 Vladimir Varlamov 2024-03-26 12:18:53 UTC
1. I always need to disable a binary package if I have a patch in `/etc/portage/patches/` for package. I would like this to happen automatically with a warning on emerge why this happened in addition to existing information.

2. Consider disabling the binary package via enabling use-flag somethign like `nobinpkg` then fetature binpkg-respect-use will work right now