commit:     dbdbb28755e61bddcb5b632518df6954a7bb0b00
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  8 20:26:24 2015 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Jul  8 20:26:24 2015 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=dbdbb287

targets/stage1/build.py: Fix bug 554154

portage.dep_getkey(pkgs[idx])

This always throws and exception because of the leading '*' making the purpose
of the entire loop from 28-35 useless.

X-Gentoo-Bug: 554154
X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=554154
X-Gentoo-Reporter: Anthony Basile <bluness <AT> gentoo.org>

Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 targets/stage1/build.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/targets/stage1/build.py b/targets/stage1/build.py
index bf20bcf..8a8a3b1 100755
--- a/targets/stage1/build.py
+++ b/targets/stage1/build.py
@@ -26,11 +26,11 @@ buildpkgs = scan_profile("packages.build")
 # system profile (it may have <,>,=,etc... operators
 # and version numbers)
 for idx in range(0, len(pkgs)):
+       pkg = pkgs[idx].lstrip('*')
        try:
-               bidx = buildpkgs.index(portage.dep_getkey(pkgs[idx]))
-               buildpkgs[bidx] = pkgs[idx]
-               if buildpkgs[bidx][0:1] == "*":
-                       buildpkgs[bidx] = buildpkgs[bidx][1:]
-       except: pass
+               bidx = buildpkgs.index(portage.dep_getkey(pkg))
+               buildpkgs[bidx] = pkg
+       except:
+               pass
 
 for b in buildpkgs: sys.stdout.write(b+" ")

Reply via email to