Pass a config instance into each dep_expand call.
authorZac Medico <zmedico@gentoo.org>
Thu, 29 Jun 2006 04:53:38 +0000 (04:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 29 Jun 2006 04:53:38 +0000 (04:53 -0000)
svn path=/main/trunk/; revision=3690

bin/emerge
pym/portage.py

index ed036f8e6c2bb8ee7f62b2c1cff618d771cc6979..7d8eb79b531d3cdbd487bdd353db55863250f82c 100755 (executable)
@@ -869,7 +869,7 @@ class depgraph:
                                        portage.writemsg("!!! (Did you specify a version but forget to prefix with '='?)\n")
                                        return (0,[])
                                try:
-                                       mykey = portage.dep_expand(x, mydb=self.portdb)
+                                       mykey = portage.dep_expand(x, mydb=self.portdb, settings=self.settings)
                                except ValueError, errpkgs:
                                        print "\n\n!!! The short ebuild name \"" + x + "\" is ambiguous.  Please specify"
                                        print "!!! one of the following fully-qualified ebuild names instead:\n"
index 4c1e2b1c5646cdbfd3aabc10a9996736800daee0..d1174f212daa3069659914588237e2f341d14304 100644 (file)
@@ -4677,7 +4677,9 @@ class vartree(packagetree):
        def dep_bestmatch(self,mydep,use_cache=1):
                "compatibility method -- all matches, not just visible ones"
                #mymatch=best(match(dep_expand(mydep,self.dbapi),self.dbapi))
-               mymatch=best(self.dbapi.match(dep_expand(mydep,mydb=self.dbapi),use_cache=use_cache))
+               mymatch = best(self.dbapi.match(
+                       dep_expand(mydep, mydb=self.dbapi, settings=self.settings),
+                       use_cache=use_cache))
                if mymatch is None:
                        return ""
                else:
@@ -5271,7 +5273,7 @@ class portdbapi(dbapi):
                if not mydep:
                        #this stuff only runs on first call of xmatch()
                        #create mydep, mykey from origdep
-                       mydep=dep_expand(origdep,mydb=self)
+                       mydep = dep_expand(origdep, mydb=self, settings=self.mysettings)
                        mykey=dep_getkey(mydep)
 
                if level=="list-visible":
@@ -5665,7 +5667,8 @@ class binarytree(packagetree):
        def exists_specific(self,cpv):
                if not self.populated:
                        self.populate()
-               return self.dbapi.match(dep_expand("="+cpv,mydb=self.dbapi))
+               return self.dbapi.match(
+                       dep_expand("="+cpv, mydb=self.dbapi, settings=self.settings))
 
        def dep_bestmatch(self,mydep):
                "compatibility method -- all matches, not just visible ones"
@@ -5673,7 +5676,7 @@ class binarytree(packagetree):
                        self.populate()
                writemsg("\n\n", 1)
                writemsg("mydep: %s\n" % mydep, 1)
-               mydep=dep_expand(mydep,mydb=self.dbapi)
+               mydep = dep_expand(mydep, mydb=self.dbapi, settings=self.settings)
                writemsg("mydep: %s\n" % mydep, 1)
                mykey=dep_getkey(mydep)
                writemsg("mykey: %s\n" % mykey, 1)