Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 152883 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.39 KB, created by
Zac Medico
on 2008-05-12 00:05:16 UTC
(
hide
)
Description:
enable variable substitution to work across multiple files
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2008-05-12 00:05:16 UTC
Size:
1.39 KB
patch
obsolete
>Index: pym/portage_util.py >=================================================================== >--- pym/portage_util.py (revision 10293) >+++ pym/portage_util.py (revision 10298) >@@ -306,7 +306,14 @@ > 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. >+ expand_map = expand >+ expand = True >+ else: >+ expand_map = {} >+ mykeys = {} > try: > f=open(mycfg,'r') > except IOError, e: >@@ -365,7 +372,8 @@ > else: > return mykeys > if expand: >- mykeys[key] = varexpand(val, mykeys) >+ mykeys[key] = varexpand(val, expand_map) >+ expand_map[key] = mykeys[key] > else: > mykeys[key] = val > except SystemExit, e: >Index: pym/portage.py >=================================================================== >--- pym/portage.py (revision 10293) >+++ pym/portage.py (revision 10298) >@@ -1440,8 +1440,10 @@ > self.make_defaults_use = [] > self.mygcfg = {} > if self.profiles: >- mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults")) \ >- for x in self.profiles] >+ expand_map = {} >+ mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults"), >+ expand=expand_map) for x in self.profiles] >+ > 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