summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/emerge/__init__.py2
-rw-r--r--pym/portage/versions.py11
2 files changed, 7 insertions, 6 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 67d70bee1..0db3862f3 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -2684,7 +2684,7 @@ class depgraph:
else:
verboseadd += "[No ebuild?]"
- xs=portage.pkgsplit(x[2])
+ xs = list(portage.pkgsplit(x[2]))
if xs[2]=="r0":
xs[2]=""
else:
diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index 95d7340a3..ebf8cbada 100644
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@ -200,7 +200,7 @@ def pkgsplit(mypkg,silent=1):
try:
if not pkgcache[mypkg]:
return None
- return pkgcache[mypkg][:]
+ return pkgcache[mypkg]
except KeyError:
pass
myparts=mypkg.split("-")
@@ -243,9 +243,9 @@ def pkgsplit(mypkg,silent=1):
pkgcache[mypkg]=None
return None
#names can't have versiony looking parts
- myval=["-".join(myparts[:verPos]),myparts[verPos],revision]
+ myval=("-".join(myparts[:verPos]),myparts[verPos],revision)
pkgcache[mypkg]=myval
- return myval[:]
+ return myval
else:
pkgcache[mypkg]=None
return None
@@ -273,7 +273,7 @@ def catpkgsplit(mydata,silent=1):
try:
if not catcache[mydata]:
return None
- return catcache[mydata][:]
+ return catcache[mydata]
except KeyError:
pass
mysplit=mydata.split("/")
@@ -288,8 +288,9 @@ def catpkgsplit(mydata,silent=1):
catcache[mydata]=None
return None
retval.extend(p_split)
+ retval = tuple(retval)
catcache[mydata]=retval
- return retval[:]
+ return retval
def catsplit(mydep):
return mydep.split("/", 1)