Allow a config instance to be passed into dep_expand so that it doesn't have to rely...
authorZac Medico <zmedico@gentoo.org>
Wed, 28 Jun 2006 18:18:32 +0000 (18:18 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 28 Jun 2006 18:18:32 +0000 (18:18 -0000)
svn path=/main/trunk/; revision=3685

pym/portage.py

index 29709b47f298b6d50a5ba0ed7110b54ee00bba9f..18aee7bd00cd9b8b5458494eac6a0eb23b537090 100644 (file)
@@ -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."""