summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2007-01-10 08:18:06 +0000
committerMarius Mauch <genone@gentoo.org>2007-01-10 08:18:06 +0000
commitdcbe82f8209090b1965d45f5e7f296eba4639ed8 (patch)
treed82c039d192dec3d8eabc7c65b543df0187db44e
parent650ab45c0dfa16b57cc01fcc03020c1032a672c7 (diff)
downloadportage-dcbe82f8209090b1965d45f5e7f296eba4639ed8.tar.gz
portage-dcbe82f8209090b1965d45f5e7f296eba4639ed8.tar.bz2
portage-dcbe82f8209090b1965d45f5e7f296eba4639ed8.zip
Stupid me, shouldn't jsut move a part of the patch
svn path=/main/trunk/; revision=5512
-rw-r--r--pym/portage.py13
-rw-r--r--pym/portage_dep.py12
2 files changed, 12 insertions, 13 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 21b8d1817..0f6f18376 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -3818,19 +3818,6 @@ def getCPFromCPV(mycpv):
"""Calls pkgsplit on a cpv and returns only the cp."""
return pkgsplit(mycpv)[0]
-def cpvequal(cpv1, cpv2):
- split1 = catpkgsplit(cpv1)
- split2 = catpkgsplit(cpv2)
-
- if not split1 or not split2:
- raise portage_exception.PortageException("Invalid data, parameter was not a CPV")
-
- if split1[0] != split2[0]:
- return False
-
- return (pkgcmp(split1[1:], split2[1:]) == 0)
-
-
def dep_virtual(mysplit, mysettings):
"Does virtual dependency conversion"
newsplit=[]
diff --git a/pym/portage_dep.py b/pym/portage_dep.py
index 60b75e03a..0a1038419 100644
--- a/pym/portage_dep.py
+++ b/pym/portage_dep.py
@@ -22,6 +22,18 @@ import re, string, sys, types
import portage_exception
from portage_versions import catpkgsplit, catsplit, pkgcmp, pkgsplit, ververify
+def cpvequal(cpv1, cpv2):
+ split1 = catpkgsplit(cpv1)
+ split2 = catpkgsplit(cpv2)
+
+ if not split1 or not split2:
+ raise portage_exception.PortageException("Invalid data, parameter was not a CPV")
+
+ if split1[0] != split2[0]:
+ return False
+
+ return (pkgcmp(split1[1:], split2[1:]) == 0)
+
def strip_empty(myarr):
"""
Strip all empty elements from an array