summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-05-12 14:00:22 -0700
committerZac Medico <zmedico@gentoo.org>2010-05-12 14:00:22 -0700
commitd4c5043ef89d320086c6dafb946039cc96a3792c (patch)
tree74d38660d2ddae04c5f0df90882580cfec991ca7 /bin/repoman
parentWhen rewritting /Attic/ in cvs headers, use binary mode in order to avoid (diff)
downloadportage-idfetch-d4c5043ef89d320086c6dafb946039cc96a3792c.tar.gz
portage-idfetch-d4c5043ef89d320086c6dafb946039cc96a3792c.tar.bz2
portage-idfetch-d4c5043ef89d320086c6dafb946039cc96a3792c.zip
Bug 270108 - Trigger ebuild.invalidname if a version contains more than
18 digits. Thanks to Ulrich Müller <ulm@g.o> for this patch.
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/repoman b/bin/repoman
index 8220a8cc..7b23aa37 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -76,6 +76,7 @@ util.initialize_logger()
max_desc_len = 100
allowed_filename_chars="a-zA-Z0-9._-+:"
disallowed_filename_chars_re = re.compile(r'[^a-zA-Z0-9._\-+:]')
+pv_toolong_re = re.compile(r'[0-9]{19,}')
bad = create_color_func("BAD")
# A sane umask is needed for files that portage creates.
@@ -1377,7 +1378,9 @@ for x in scanlist:
stats["ebuild.notadded"]=stats["ebuild.notadded"]+1
fails["ebuild.notadded"].append(x+"/"+y+".ebuild")
myesplit=portage.pkgsplit(y)
- if myesplit is None or myesplit[0] != x.split("/")[-1]:
+ if myesplit is None or myesplit[0] != x.split("/")[-1] \
+ or pv_toolong_re.search(myesplit[1]) \
+ or pv_toolong_re.search(myesplit[2]):
stats["ebuild.invalidname"]=stats["ebuild.invalidname"]+1
fails["ebuild.invalidname"].append(x+"/"+y+".ebuild")
continue