Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 152881 Details for
Bug 221755
Please support better make.defaults variables substitution
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
enable variable substitution to work across multiple files
substitution.patch (text/plain), 1.18 KB, created by
Zac Medico
on 2008-05-11 23:25:29 UTC
(
hide
)
Description:
enable variable substitution to work across multiple files
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-05-11 23:25:29 UTC
Size:
1.18 KB
patch
obsolete
>Index: pym/portage_util.py >=================================================================== >--- pym/portage_util.py (revision 10292) >+++ pym/portage_util.py (working copy) >@@ -306,7 +306,13 @@ > return (newfile, StringIO.StringIO()) > > def getconfig(mycfg, tolerant=0, allow_sourcing=False, expand=True): >- mykeys={} >+ if isinstance(expand, dict): >+ # Some existing variable definitions have been >+ # passed in, for use in substitutions. >+ mykeys = expand.copy() >+ expand = True >+ else: >+ mykeys = {} > try: > f=open(mycfg,'r') > except IOError, e: >Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 10292) >+++ pym/portage.py (working copy) >@@ -1440,8 +1440,13 @@ > self.make_defaults_use = [] > self.mygcfg = {} > if self.profiles: >- mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults")) \ >- for x in self.profiles] >+ mygcfg_dlists = [] >+ var_map = {} >+ for x in self.profiles: >+ var_map = getconfig(os.path.join(x, "make.defaults"), >+ expand=var_map) >+ mygcfg_dlists.append(var_map) >+ > for cfg in mygcfg_dlists: > if cfg: > self.make_defaults_use.append(cfg.get("USE", ""))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 221755
:
152881
|
152883