summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-09-12 23:18:56 +0000
committerZac Medico <zmedico@gentoo.org>2009-09-12 23:18:56 +0000
commit98d3d5e5f1d0c07935a12cf8b38103cf0f1314f1 (patch)
treedabe7ad7843af3eb831b26753668282c775bc2a1
parentcb78871ec00fb0647076540318b9fb2d11f22363 (diff)
downloadportage-98d3d5e5f1d0c07935a12cf8b38103cf0f1314f1.tar.gz
portage-98d3d5e5f1d0c07935a12cf8b38103cf0f1314f1.tar.bz2
portage-98d3d5e5f1d0c07935a12cf8b38103cf0f1314f1.zip
Add backward compatibility to isjustname(), so the tests don't fail.
svn path=/main/trunk/; revision=14239
-rw-r--r--pym/portage/dep.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py
index 865db16a7..f2c11b239 100644
--- a/pym/portage/dep.py
+++ b/pym/portage/dep.py
@@ -934,7 +934,16 @@ def isjustname(mypkg):
1) False if the package string is not just the package name
2) True if it is
"""
- return str(mypkg) == str(Atom(mypkg).cp)
+ try:
+ return mypkg == Atom(mypkg).cp
+ except InvalidAtom:
+ pass
+
+ myparts = mypkg.split('-')
+ for x in myparts:
+ if ververify(x):
+ return False
+ return True
iscache = {}