Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639134 - emerge --pretend @world disregards USE_ORDER as defined by package.env
Summary: emerge --pretend @world disregards USE_ORDER as defined by package.env
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-29 02:45 UTC by kfm
Modified: 2019-12-19 18:49 UTC (History)
0 users

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


Attachments
emerge --info (emerge-info.txt,5.19 KB, text/plain)
2017-11-29 02:45 UTC, kfm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2017-11-29 02:45:40 UTC
Created attachment 507048 [details]
emerge --info

As per the summary ...

~ # cat /etc/portage/package.env
dev-lang/php php.conf

~ # cat /etc/portage/env/php.conf
# I prefer for the "defaults" not to affect php (the "pkginternal" flags make for a better baseline)
USE_ORDER="env:pkg:conf:pkginternal:repo:env.d"

~ # grep -F dev-lang/php /var/lib/portage/world
dev-lang/php:5.6

~ # emerge -qpv php:5.6
[ebuild     U ] dev-lang/php-5.6.32 [5.6.31] USE="cli ctype fileinfo filter hash iconv ipv6 json libressl mysqli nls opcache pcntl phar posix readline session simplexml tokenizer unicode xml -acl -apache2 -bcmath -berkdb -bzip2 -calendar -cdb -cgi -cjk -coverage -crypt -curl -debug -embed -enchant -exif (-firebird) -flatfile -fpm -ftp -gd -gdbm -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit -libmysqlclient -mhash -mssql -mysql -oci8-instant-client -odbc -pdo -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sockets -spell -sqlite -ssl* -sybase-ct -systemd -sysvipc -threads -tidy -truetype -vpx -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip -zlib*"

~ # emerge -qpv @world | grep -F dev-lang/php
[ebuild     U ] dev-lang/php-5.6.32 [5.6.31] USE="acl* berkdb* bzip2* cli ctype fileinfo filter gdbm* hash iconv ipv6 json libressl mysqli nls opcache pcntl phar posix readline session simplexml ssl tokenizer unicode xml zlib -apache2 -bcmath -calendar -cdb -cgi -cjk -coverage -crypt -curl -debug -embed -enchant -exif (-firebird) -flatfile -fpm -ftp -gd -gmp -imap -inifile -intl -iodbc -kerberos -ldap -ldap-sasl -libedit -libmysqlclient -mhash -mssql -mysql -oci8-instant-client -odbc -pdo -postgres -qdbm -recode (-selinux) -sharedmem -snmp -soap -sockets -spell -sqlite -sybase-ct -systemd -sysvipc -threads -tidy -truetype -vpx -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xslt -zip"

In summary, the output of emerge -pv php:5.6 is correct, given the current state of this particular system. However, the output of emerge -pv @world is not. In the latter case, my USE_ORDER override is apparently ignored, with profile-sourced flags being enabled as a result (acl, berkdb, bzip2, gdbm and so forth).

My expectation is that portage should respect my definition of USE_ORDER for dev-lang/php, regardless of whether emerge is given a package atom or the name of a set to operate upon, and that the USE flags applied should be indentical in both cases.
Comment 1 kfm 2019-12-19 11:20:26 UTC
I ran into this again just today. emerge -auDN @world doesn't respect my package.env policy, but emerging an individual package/atom does. It actually prevents me from implementing and working with the policies that I want. Can this please be looked into?
Comment 2 Zac Medico gentoo-dev 2019-12-19 18:49:27 UTC
It seems fixable. The package.env handling begins here:

https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/package/ebuild/config.py?h=portage-2.3.82#n1619

And USE_ORDER needs to be evaluated prior to the first call to self.reset() here:

https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/package/ebuild/config.py?h=portage-2.3.82#n1675

The reset method calls the regenerate method, which uses USE_ORDER here:

https://gitweb.gentoo.org/proj/portage.git/tree/lib/portage/package/ebuild/config.py?h=portage-2.3.82#n2430