Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r14510 - main/trunk/bin
Date: Wed, 07 Oct 2009 15:14:44
Message-Id: E1MvYDy-0000Le-Es@stork.gentoo.org
1 Author: arfrever
2 Date: 2009-10-07 15:14:42 +0000 (Wed, 07 Oct 2009)
3 New Revision: 14510
4
5 Modified:
6 main/trunk/bin/repoman
7 Log:
8 Bug #274870: Add file.size.fatal check in repoman.
9
10
11 Modified: main/trunk/bin/repoman
12 ===================================================================
13 --- main/trunk/bin/repoman 2009-10-07 05:05:29 UTC (rev 14509)
14 +++ main/trunk/bin/repoman 2009-10-07 15:14:42 UTC (rev 14510)
15 @@ -261,7 +261,8 @@
16 "changelog.notadded":"ChangeLogs that exist but have not been added to cvs",
17 "filedir.missing":"Package lacks a files directory",
18 "file.executable":"Ebuilds, digests, metadata.xml, Manifest, and ChangeLog do note need the executable bit",
19 - "file.size":"Files in the files directory must be under 20k",
20 + "file.size":"Files in the files directory must be under 20 KiB",
21 + "file.size.fatal":"Files in the files directory must be under 60 KiB",
22 "file.name":"File/dir name must be composed of only the following chars: %s " % allowed_filename_chars,
23 "file.UTF8":"File is not UTF8 compliant",
24 "inherit.autotools":"Ebuild inherits autotools but does not call eautomake, eautoconf or eautoreconf",
25 @@ -1130,10 +1131,14 @@
26 if z == "CVS" or z == ".svn":
27 continue
28 filesdirlist.append(y+"/"+z)
29 - # current policy is no files over 20k, this is the check.
30 + # Current policy is no files over 20 KiB, these are the checks. File size between
31 + # 20 KiB and 60 KiB causes a warning, while file size over 60 KiB causes an error.
32 + elif mystat.st_size > 61440:
33 + stats["file.size.fatal"] += 1
34 + fails["file.size.fatal"].append("("+ str(mystat.st_size//1024) + " KiB) "+x+"/files/"+y)
35 elif mystat.st_size > 20480:
36 stats["file.size"] += 1
37 - fails["file.size"].append("("+ str(mystat.st_size//1024) + "K) "+x+"/files/"+y)
38 + fails["file.size"].append("("+ str(mystat.st_size//1024) + " KiB) "+x+"/files/"+y)
39
40 m = disallowed_filename_chars_re.search(
41 os.path.basename(y.rstrip(os.sep)))