Check if the specified package follows correct syntax and error out if it
authorJason Stubbs <jstubbs@gentoo.org>
Fri, 23 Dec 2005 11:55:31 +0000 (11:55 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Fri, 23 Dec 2005 11:55:31 +0000 (11:55 -0000)
doesn't.

svn path=/main/trunk/; revision=2440

bin/ebuild

index 603212e2564f0a034e708bb9efe3f7d606faaf44..438582cb35ea1cff3bd0b59b8b0af7aa65ac10a3 100755 (executable)
@@ -35,6 +35,10 @@ ebuild_split = ebuild.split("/")
 del ebuild_split[-2]
 cpv = "/".join(ebuild_split[-2:])[:-7]
 
+if not portage.catpkgsplit(cpv):
+       print "!!! %s does not follow correct package syntax." % (cpv)
+       sys.exit(1)
+
 if ebuild.startswith(portage.root + portage_const.VDB_PATH):
        mytree = "vartree"