summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-06-28 18:18:32 +0000
committerZac Medico <zmedico@gentoo.org>2006-06-28 18:18:32 +0000
commit9d93505cc4daed75fda4ba7cbe7476263ab70615 (patch)
treea2885ed17ebab70bd28b316ee173c604671063af
parent4b29012d31e05d746763c9c103fbb00cda0f5c04 (diff)
downloadportage-9d93505cc4daed75fda4ba7cbe7476263ab70615.tar.gz
portage-9d93505cc4daed75fda4ba7cbe7476263ab70615.tar.bz2
portage-9d93505cc4daed75fda4ba7cbe7476263ab70615.zip
Allow a config instance to be passed into dep_expand so that it doesn't have to rely on global settings.
svn path=/main/trunk/; revision=3685
-rw-r--r--pym/portage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 29709b47f..18aee7bd0 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3404,7 +3404,7 @@ def dep_transform(mydep,oldkey,newkey):
else:
return origdep
-def dep_expand(mydep,mydb=None,use_cache=1):
+def dep_expand(mydep, mydb=None, use_cache=1, settings=None):
if not len(mydep):
return mydep
if mydep[0]=="*":
@@ -3420,7 +3420,8 @@ def dep_expand(mydep,mydb=None,use_cache=1):
elif mydep[:1] in "=<>~!":
prefix=mydep[:1]
mydep=mydep[1:]
- return prefix+cpv_expand(mydep,mydb=mydb,use_cache=use_cache)+postfix
+ return prefix + cpv_expand(
+ mydep, mydb=mydb, use_cache=use_cache, settings=settings) + postfix
def dep_check(depstring,mydbapi,mysettings,use="yes",mode=None,myuse=None,use_cache=1,use_binaries=0,myroot="/"):
"""Takes a depend string and parses the condition."""