summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-11 11:37:09 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-11 11:37:09 +0000
commit020d2ce7c8a81434de1d86d67e9594875720f3db (patch)
treea5e803fd9973ad037d7194c92c646bd65101b709
parentBug #162450 - Try to avoid having so many bugs marked UPSTREAM by (diff)
downloadportage-multirepo-020d2ce7c8a81434de1d86d67e9594875720f3db.tar.gz
portage-multirepo-020d2ce7c8a81434de1d86d67e9594875720f3db.tar.bz2
portage-multirepo-020d2ce7c8a81434de1d86d67e9594875720f3db.zip
Add a DESCRIPTION.toolong warning for when the DESCRIPTION line is
over 80 characters long. Thanks to Betelgeuse for the patch. (trunk r9177) svn path=/main/branches/2.1.2/; revision=9181
-rwxr-xr-xbin/repoman11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/repoman b/bin/repoman
index 738746e6..9b721e96 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -34,6 +34,8 @@ if not hasattr(__builtins__, "set"):
exename=os.path.basename(sys.argv[0])
version="1.2"
+# 14 is the length of DESCRIPTION=""
+max_desc_len = 80 - 14
allowed_filename_chars="a-zA-Z0-9._-+:"
allowed_filename_chars_set = {}
map(allowed_filename_chars_set.setdefault, map(chr, range(ord('a'), ord('z')+1)))
@@ -168,6 +170,7 @@ qahelp={
"KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask",
"LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
"DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
+ "DESCRIPTION.toolong":"DESCRIPTION line is over 80 characters",
"EAPI.unsupported":"Ebuilds that have an unsupported EAPI version (you must upgrade portage)",
"SLOT.missing":"Ebuilds that have a missing or empty SLOT variable",
"HOMEPAGE.missing":"Ebuilds that have a missing or empty HOMEPAGE variable",
@@ -229,6 +232,7 @@ qawarnings=[
"DEPEND.badmasked","RDEPEND.badmasked","PDEPEND.badmasked",
"DEPEND.badindev","RDEPEND.badindev","PDEPEND.badindev",
"DEPEND.badmaskedindev","RDEPEND.badmaskedindev","PDEPEND.badmaskedindev",
+"DESCRIPTION.toolong",
"IUSE.invalid",
"KEYWORDS.stupid",
"KEYWORDS.missing",
@@ -1449,6 +1453,13 @@ for x in scanlist:
stats[myqakey]=stats[myqakey]+1
fails[myqakey].append(x+"/"+y+".ebuild")
+ # 14 is the length of DESCRIPTION=""
+ if len(myaux['DESCRIPTION']) > max_desc_len:
+ stats['DESCRIPTION.toolong'] += 1
+ fails['DESCRIPTION.toolong'].append(
+ "%s: DESCRIPTION is %d characters (max %d)" % \
+ (relative_path, len(myaux['DESCRIPTION']), max_desc_len))
+
keywords = myaux["KEYWORDS"].split()
stable_keywords = []
for keyword in keywords: