For bug #149397, raise an InvalidDependString exception if a USE has no basename.
authorZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 15:03:48 +0000 (15:03 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Jun 2007 15:03:48 +0000 (15:03 -0000)
svn path=/main/trunk/; revision=6706

pym/portage/dbapi/porttree.py

index c99b0193c2cc8328a42dc31b8f437d65b823b497..5bf1e30a64f2d9ea8f7a44992e2eff331ac34ee9 100644 (file)
@@ -371,6 +371,8 @@ class portdbapi(dbapi):
                myfiles = []
                for x in newuris:
                        mya = os.path.basename(x)
+                       if not mya:
+                               raise portage.exception.InvalidDependString("URI has no basename: '%s'" % x)
                        if not mya in myfiles:
                                myfiles.append(mya)
                return [newuris, myfiles]