Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 221755

Summary: Please support better make.defaults variables substitution
Product: Portage Development Reporter: Grzegorz Kulewski <grzegorz>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement Keywords: InVCS
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 216231    
Attachments: enable variable substitution to work across multiple files
enable variable substitution to work across multiple files

Description Grzegorz Kulewski 2008-05-11 21:58:01 UTC
Please add support for constructs like:
profile A, make.defaults: CFLAGS="-O2 -pipe",
profile B, make.defaults: CFLAGS="${CFLAGS} -ggdb",
profile C inherits from A and B in that order and wants to have CFLAGS="-O2 -pipe -ggdb" and NOT CFLAGS=" -ggdb".

Thanks.


From #gentoo-portage (2008-05-11):
23:39 < gk> zmedico: if my profile inherits something setting CFLAGS="-O2 -pipe" and then inherits something setting CFLAGS="${CFLAGS} -ggdb" - shouldn't it work as expected?
23:39 < gk> because right now I get CFLAGS=" -ggdb" as a result :/
23:40 < antarus> I assume you are talking about make.globals?
23:40 < antarus> er s/globals/defaults/
23:40 < gk> make.defaults
23:40 < gk> yes
23:40 < zmedico> make.defaults doesn't support variable substitution (at least not across multiple files)
23:41 < zmedico> it might work within one file
23:47 < zmedico> I wouldn't mind supporting normal variable substitution like you tried to do
23:48 < zmedico> if you file a feature request bug for better make.defaults variable substitution then I'll fix it
23:48 < zmedico> it can go into portage-2.1.5
23:49 < zmedico> I expect the patch to be pretty small
23:49 < zmedico> and it makes sense anyway.
23:49 < antarus> indeed it does


Reproducible: Always

Steps to Reproduce:
profile A, make.defaults: CFLAGS="-O2 -pipe",
profile B, make.defaults: CFLAGS="${CFLAGS} -ggdb",
profile C inherits from A and B in that order.
Actual Results:  
CFLAGS=" -ggdb"

Expected Results:  
CFLAGS="-O2 -pipe -ggdb"
Comment 1 Zac Medico gentoo-dev 2008-05-11 23:25:29 UTC
Created attachment 152881 [details, diff]
enable variable substitution to work across multiple files
Comment 2 Zac Medico gentoo-dev 2008-05-11 23:33:34 UTC
Actually, that patch has some unintended side-effects. I'll have another one in a few minutes.
Comment 3 Zac Medico gentoo-dev 2008-05-12 00:05:16 UTC
Created attachment 152883 [details, diff]
enable variable substitution to work across multiple files
Comment 4 Zac Medico gentoo-dev 2008-05-14 21:39:06 UTC
This is fixed in 2.1.5.