Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 109178 Details for
Bug 165349
repoman's version verification doesn't match portage version rules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to use portage.versions.ververify
repoman-sucks.patch (text/plain), 2.06 KB, created by
Brian Harring (RETIRED)
on 2007-02-04 22:08:13 UTC
(
hide
)
Description:
patch to use portage.versions.ververify
Filename:
MIME Type:
Creator:
Brian Harring (RETIRED)
Created:
2007-02-04 22:08:13 UTC
Size:
2.06 KB
patch
obsolete
>Index: repoman >=================================================================== >--- repoman (revision 5789) >+++ repoman (working copy) >@@ -34,6 +34,7 @@ > import portage.const > import portage.dep > import portage.exception >+import portage.versions > import cvstree > import time > import codecs >@@ -225,30 +226,21 @@ > 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 valid_ebuild_name(pkg, name): >+ """(package, name) --- Checks to ensure that the package name meets >+ portage specs. >+ Return a bool, True if valid. >+ """ >+ if name.endswith(".ebuild"): >+ name = name[:-7] >+ # be anal, and verify the ebuild name is the same >+ l = len(pkg) >+ if not name.startswith(pkg +"-"): >+ return False >+ return portage.versions.ververify(name[l + 1:]) > > > def show_version(): >@@ -981,7 +973,7 @@ > 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 not valid_ebuild_name(x.split("/")[-1], y): > stats["ebuild.invalidname"]=stats["ebuild.invalidname"]+1 > fails["ebuild.invalidname"].append(x+"/"+y+".ebuild") > continue
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165349
: 109178