Summary: | sys-apps/portage-2.1.9.*: defaulted USE_EXPAND variables (APACHE2_MODULES) not handled properly in make.defaults in overlay profiles | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Chris Frederick <cdf123> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | vugluskr |
Priority: | Highest | ||
Version: | 2.1 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Chris Frederick
2011-01-13 19:23:04 UTC
The USE_EXPAND behavior changed between 2.1.9.24 and 2.1.9.25, in this commit: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=87da6752e50fd7658b53afb0fa2bd32b0d3ed64d You can set USE="-apache2_modules_*" in make.defaults if you want to discard the corresponding flags from the parent profile. Is /etc/make.conf handled differently then? If you add the same APACHE2_MODULES to /etc/make.conf it works as expected, completely overwriting the base/make.defaults value. Is there a plan on migrating the changes to /etc/make.conf, or is the file considered special case? I also noticed the same behavior in 2.1.8.3 as well. The code is a special case for make.defaults, and has no effect on make.conf handling. This was intended so that it would not conflict with the way that the majority of people do their USE_EXPAND settings in make.conf. Ok, thanks Zac, that explains things. And using the USE flags works. Now on portage-2.1.10.49 it not working in both variants. If I not add line "USE="$USE -apache2_modules_* -apache2_mpms_*"" into profile's make.default - then APACHE2_MODULES setting completely ignored. If I add line "USE="$USE -apache2_modules_* -apache2_mpms_*"", then all modules become disabled. So APACHE2_MODULES variable completely ignored in both cases. How can I override APACHE2_MODULES in my custom profile? (In reply to comment #5) > "USE="$USE -apache2_modules_* -apache2_mpms_*"" into profile's make.default Variables references like $USE are not supported in make.defaults. Use ${USE} instead. Now works! Thanks! Sorry for not enough documentation "dig" from my side. After all not working. :_: I forgot to remove APACHE2_MODULES from /etc/make.conf, and if affect on results of my last test. :_: So if USE variable contain "-apache2_modules_*" all apache modules will be disabled regardless of APACHE2_MODULE value. But if I make one more profile: (build-in profile) `- my dummy profile `- my profile In "my dummy profile" put line "USE="-apache2_modules_* -apache2_mpms_*"" into make.defaults. In "my profile" put required for me APACHE2_MODULES in make.defaults, then it will be applied to apache USE flags as expected. ---- I think that changes from USE variable applied after changes from APACHE2_MODULES and it overwrite all changes in APACHE2_MODULES if they present in one profile. (In reply to comment #8) > In "my profile" put required for me APACHE2_MODULES in make.defaults, then > it will be applied to apache USE flags as expected. Yes, make.defaults has special support for setting of USE_EXPAND variables: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=637a13355cf4cc2906e34b61606d31d62acc9fcc But it now work in incremental way, at least in portage-2.1.10.49. For example I set APACHE2_MODULES="-cgid" into my profile's make.defaults. And on emerge -pv apache, I got following: --- << cut line << --- # emerge -pv apache These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] www-servers/apache-2.2.21-r1 USE="ssl -debug -doc -ldap (-selinux) -static -suexec -threads" APACHE2_MODULES="-actions* -alias* -asis -auth_basic* -auth_digest -authn_alias* -authn_anon* -authn_dbd -authn_dbm* -authn_default* -authn_file* -authz_dbm* -authz_default* -authz_groupfile* -authz_host* -authz_owner* -authz_user* -autoindex* -cache* -cern_meta -cgi* -cgid* -charset_lite -dav* -dav_fs* -dav_lock* -dbd -deflate* -dir* -disk_cache* -dumpio -env* -expires* -ext_filter* -file_cache* -filter* -headers* -ident -imagemap -include* -info* -log_config* -log_forensic -logio* -mem_cache* -mime* -mime_magic* -negotiation* -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -proxy_scgi -reqtimeout -rewrite* -setenvif* -speling* -status* -substitute -unique_id* -userdir* -usertrack* -version -vhost_alias*" APACHE2_MPMS="peruser -event -itk -prefork -worker" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Invalid '-' operator in non-incremental variable 'APACHE2_MODULES': '-cgid' --- << cut line << --- And last line say that it should be used in incremental way. (In reply to comment #10) > Invalid '-' operator in non-incremental variable 'APACHE2_MODULES': '-cgid' > --- << cut line << --- > > And last line say that it should be used in incremental way. You can get the behavior that what you want like this: USE="${USE} -apache2_modules_cgid" (In reply to comment #11) > (In reply to comment #10) > > Invalid '-' operator in non-incremental variable 'APACHE2_MODULES': '-cgid' > > --- << cut line << --- > > > > And last line say that it should be used in incremental way. > > You can get the behavior that what you want like this: > > USE="${USE} -apache2_modules_cgid" I understand this. But this not change situations with USE_EXPANDED variables, IMHO they support are completely broken in portage's profiles. (In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #10) > > > Invalid '-' operator in non-incremental variable 'APACHE2_MODULES': '-cgid' > > > --- << cut line << --- > > > > > > And last line say that it should be used in incremental way. > > > > You can get the behavior that what you want like this: > > > > USE="${USE} -apache2_modules_cgid" > > I understand this. > > But this not change situations with USE_EXPANDED variables, IMHO they > support are completely broken in portage's profiles. It works fine. Portage will automatically generate an appropriate APACHE2_MODULES value based on the corresponding USE flags. In other world - you want say "this is not bug"... i.e. by design profiles must never define USE_EXTENDED variables? They must always use long variants of use flags? (In reply to comment #14) > In other world - you want say "this is not bug"... Right. > i.e. by design profiles must never define USE_EXTENDED variables? Well, positive settings are supported, since there's a long history of setting positive defaults in profiles/base/make.defaults. I count approximately 12 such settings there now. > They must always use long variants of use flags? For negative settings, yes. (In reply to comment #15) > (In reply to comment #14) > > In other world - you want say "this is not bug"... > > Right. > > > i.e. by design profiles must never define USE_EXTENDED variables? > > Well, positive settings are supported, since there's a long history of > setting positive defaults in profiles/base/make.defaults. I count > approximately 12 such settings there now. > > > They must always use long variants of use flags? > > For negative settings, yes. hmm... not intuitive at all. Where can I read about other underwater stones in creating portage's profiles? PS man 5 portage, I have read already. The USE_EXPAND documentation could certainly be improved. Currently, it's only documented in the make.conf(5) man page, and there's no mention of it in portage(5). (In reply to comment #17) > The USE_EXPAND documentation could certainly be improved. Currently, it's > only documented in the make.conf(5) man page, and there's no mention of it > in portage(5). I have read all portage related man pages, but there is too little info about cascading profiles. Where this info can be found? See Chapter 5 of app-doc/pms. *** This bug has been marked as a duplicate of bug 530222 *** |