For bug #165349, use the portage_versions regex (via pkgsplit) instead of the incompa...
authorZac Medico <zmedico@gentoo.org>
Mon, 5 Feb 2007 21:31:22 +0000 (21:31 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 5 Feb 2007 21:31:22 +0000 (21:31 -0000)
svn path=/main/branches/2.1.2/; revision=5900

bin/repoman

index a476bd64aa38a9a48c5273975c91d9c5b915b151..d228222b741ecb73527e7a94db6da4647b2848a8 100755 (executable)
@@ -225,32 +225,9 @@ for x in missingvars:
                qawarnings.append(x)
 
 
-ven_cat = r'[\w0-9-]+'                                 # Category
-ven_nam = r'([+a-z0-9-]+(?:[+_a-z0-9-]*[+a-z0-9-]+)*)' # Name
-ven_ver = r'((?:\d+\.)*\d+[a-z]?)'                     # Version
-ven_suf = r'(_(alpha\d*|beta\d*|pre\d*|rc\d*|p\d+))?'  # Suffix
-ven_rev = r'(-r\d+)?'                                  # Revision
-       
-ven_string=ven_cat+'/'+ven_nam+'-'+ven_ver+ven_suf+ven_rev
-valid_ebuild_name_re=re.compile(ven_string+'$', re.I)
-valid_ebuild_filename_re=re.compile(ven_string+'\.ebuild$', re.I)
-
 verbose=0
 quiet=0
 
-def valid_ebuild_name(name):
-       """(name) --- Checks to ensure that the package name meets portage specs.
-       Return 1 if valid, 0 if not."""
-       # Handle either a path to the ebuild, or cat/pkg-ver string
-       if (len(name) > 7) and (name[-7:] == ".ebuild"):
-               if valid_ebuild_filename_re.match(name):
-                       return 1
-       else:
-               if valid_ebuild_name_re.match(name):
-                       return 1
-       return 0
-
-
 def show_version():
        print exename+" "+version
        sys.exit(0)
@@ -981,7 +958,7 @@ for x in scanlist:
                                stats["digest.missing"]=stats["digest.missing"]+1
                                fails["digest.missing"].append(x+"/files/digest-"+y)
                myesplit=portage.pkgsplit(y)
-               if myesplit is None or not valid_ebuild_name(x.split("/")[0]+"/"+y):
+               if myesplit is None or myesplit[0] != x.split("/")[-1]:
                        stats["ebuild.invalidname"]=stats["ebuild.invalidname"]+1
                        fails["ebuild.invalidname"].append(x+"/"+y+".ebuild")
                        continue