summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-07 15:14:42 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-10-07 15:14:42 +0000
commitbbfed263f01a7cf6bccc6c2f943058ff8ea334b1 (patch)
treed4a4db6725f2bc7b719b8d27ca98f3affff9f0ab /bin/repoman
parentUse the stricter _pkgsplit function. (diff)
downloadportage-idfetch-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.tar.gz
portage-idfetch-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.tar.bz2
portage-idfetch-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.zip
Bug #274870: Add file.size.fatal check in repoman.
svn path=/main/trunk/; revision=14510
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/repoman b/bin/repoman
index 5deef88f..c764aed7 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -261,7 +261,8 @@ qahelp={
"changelog.notadded":"ChangeLogs that exist but have not been added to cvs",
"filedir.missing":"Package lacks a files directory",
"file.executable":"Ebuilds, digests, metadata.xml, Manifest, and ChangeLog do note need the executable bit",
- "file.size":"Files in the files directory must be under 20k",
+ "file.size":"Files in the files directory must be under 20 KiB",
+ "file.size.fatal":"Files in the files directory must be under 60 KiB",
"file.name":"File/dir name must be composed of only the following chars: %s " % allowed_filename_chars,
"file.UTF8":"File is not UTF8 compliant",
"inherit.autotools":"Ebuild inherits autotools but does not call eautomake, eautoconf or eautoreconf",
@@ -1130,10 +1131,14 @@ for x in scanlist:
if z == "CVS" or z == ".svn":
continue
filesdirlist.append(y+"/"+z)
- # current policy is no files over 20k, this is the check.
+ # Current policy is no files over 20 KiB, these are the checks. File size between
+ # 20 KiB and 60 KiB causes a warning, while file size over 60 KiB causes an error.
+ elif mystat.st_size > 61440:
+ stats["file.size.fatal"] += 1
+ fails["file.size.fatal"].append("("+ str(mystat.st_size//1024) + " KiB) "+x+"/files/"+y)
elif mystat.st_size > 20480:
stats["file.size"] += 1
- fails["file.size"].append("("+ str(mystat.st_size//1024) + "K) "+x+"/files/"+y)
+ fails["file.size"].append("("+ str(mystat.st_size//1024) + " KiB) "+x+"/files/"+y)
m = disallowed_filename_chars_re.search(
os.path.basename(y.rstrip(os.sep)))