Return copies of the cached values from pkgsplit and catpkgsplit.
authorZac Medico <zmedico@gentoo.org>
Wed, 6 Jun 2007 07:54:25 +0000 (07:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 6 Jun 2007 07:54:25 +0000 (07:54 -0000)
svn path=/main/trunk/; revision=6746

pym/portage/versions.py

index 25b373e172a362c118cd5eafe35d56572cfc6ffc..95d7340a3c4ed24e3ee53676728349fefd799906 100644 (file)
@@ -245,7 +245,7 @@ def pkgsplit(mypkg,silent=1):
                                        #names can't have versiony looking parts
                        myval=["-".join(myparts[:verPos]),myparts[verPos],revision]
                        pkgcache[mypkg]=myval
-                       return myval
+                       return myval[:]
        else:
                pkgcache[mypkg]=None
                return None
@@ -289,7 +289,7 @@ def catpkgsplit(mydata,silent=1):
                return None
        retval.extend(p_split)
        catcache[mydata]=retval
-       return retval
+       return retval[:]
 
 def catsplit(mydep):
         return mydep.split("/", 1)