For bug #149397, raise an InvalidDependString exception if a USE has no basename...
[portage.git] / pym / portage.py
index 20ed0569ff2a7bd71a40db90b29e7907b3817dbd..d4c6615b916bbcd5500e11bdc804ef28798d1ab3 100644 (file)
@@ -5983,6 +5983,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]