Fix depgraph.select_files() so that arguments are expanded
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Feb 2008 10:04:59 +0000 (10:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Feb 2008 10:04:59 +0000 (10:04 -0000)
against the vardb when expansion against the binary repo
fails in --usepkgonly mode.

svn path=/main/branches/2.1.2/; revision=9295

bin/emerge

index 3d697502bdda7d4dfd2ae431b2758c300618bf68..d93bf908fbf0403d517dd2dc2e46c7125248bda2 100755 (executable)
@@ -1837,8 +1837,14 @@ class depgraph:
                                        if "--usepkg" in self.myopts:
                                                mykey = portage.dep_expand(x, mydb=bindb,
                                                        settings=pkgsettings)
-                                       if "--usepkgonly" in self.myopts or \
-                                               (mykey and not portage.dep_getkey(mykey).startswith("null/")):
+                                       if ("--usepkgonly" in self.myopts or mykey) and \
+                                               not portage.dep_getkey(mykey).startswith("null/"):
+                                               arg_atoms.append((x, mykey))
+                                               continue
+
+                                       if "--usepkgonly" in self.myopts:
+                                               mykey = portage.dep_expand(x, mydb=vardb,
+                                                       settings=pkgsettings)
                                                arg_atoms.append((x, mykey))
                                                continue