summaryrefslogtreecommitdiffstats
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
parent270a2881d4f5e3e9d40a256dd215d206e131ab41 (diff)
downloadportage-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.tar.gz
portage-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.tar.bz2
portage-bbfed263f01a7cf6bccc6c2f943058ff8ea334b1.zip
Bug #274870: Add file.size.fatal check in repoman.
svn path=/main/trunk/; revision=14510
-rwxr-xr-xbin/repoman11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/repoman b/bin/repoman
index 5deef88f9..c764aed7f 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)))