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.
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?
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