Fix dep_getcpv() so that it always properly removes the slot regardless of which...
authorZac Medico <zmedico@gentoo.org>
Tue, 29 May 2007 12:41:41 +0000 (12:41 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 29 May 2007 12:41:41 +0000 (12:41 -0000)
svn path=/main/branches/2.1.2/; revision=6662

pym/portage_dep.py

index 051b8a5ca92788ed41754853726ebd55bcc99044..de25866057e6013abd433fde54a7330e476529f4 100644 (file)
@@ -303,6 +303,8 @@ def dep_getcpv(mydep):
        if retval is not None:
                return retval
        mydep_orig = mydep
+       if mydep:
+               mydep = remove_slot(mydep)
        if mydep and mydep[0] == "*":
                mydep = mydep[1:]
        if mydep and mydep[-1] == "*":
@@ -313,9 +315,6 @@ def dep_getcpv(mydep):
                mydep = mydep[2:]
        elif mydep[:1] in "=<>~":
                mydep = mydep[1:]
-       colon = mydep.rfind(":")
-       if colon != -1:
-               mydep = mydep[:colon]
        _dep_getcpv_cache[mydep_orig] = mydep
        return mydep