commit:     6258c62c84bf60b8ade8b7fb63ed4475c6195f21
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 18 06:20:08 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Oct 18 08:16:12 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=6258c62c

repoman: fix file.size-fatal to be 20 KiB

Closes: https://github.com/gentoo/portage/pull/629
Bug: https://bugs.gentoo.org/748144
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 repoman/cnf/qa_data/qa_data.yaml                  | 1 -
 repoman/cnf/repository/qa_data.yaml               | 1 -
 repoman/lib/repoman/modules/scan/fetch/fetches.py | 7 +------
 repoman/man/repoman.1                             | 2 +-
 4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/repoman/cnf/qa_data/qa_data.yaml b/repoman/cnf/qa_data/qa_data.yaml
index 9a807aaf3..29a3d6e9f 100644
--- a/repoman/cnf/qa_data/qa_data.yaml
+++ b/repoman/cnf/qa_data/qa_data.yaml
@@ -60,7 +60,6 @@ qahelp:
     file:
         executable: "Ebuilds, digests, metadata.xml, Manifest, and ChangeLog 
do not need the executable bit"
         size: "Files in the files directory must be under 20 KiB"
-        size-fatal: "Files in the files directory must be under 60 KiB"
         empty: "Empty file in the files directory"
         name: "File/dir name must be composed of only the following chars: %s "
         UTF8: "File is not UTF8 compliant"

diff --git a/repoman/cnf/repository/qa_data.yaml 
b/repoman/cnf/repository/qa_data.yaml
index 464482056..3fe6b53d5 100644
--- a/repoman/cnf/repository/qa_data.yaml
+++ b/repoman/cnf/repository/qa_data.yaml
@@ -59,7 +59,6 @@ qawarnings:
     - ebuild.badheader
     - ebuild.patches
     - file.empty
-    - file.size
     - HOMEPAGE.virtual
     - inherit.unused
     - inherit.deprecated

diff --git a/repoman/lib/repoman/modules/scan/fetch/fetches.py 
b/repoman/lib/repoman/modules/scan/fetch/fetches.py
index 5a958a461..7d4c58908 100644
--- a/repoman/lib/repoman/modules/scan/fetch/fetches.py
+++ b/repoman/lib/repoman/modules/scan/fetch/fetches.py
@@ -120,12 +120,7 @@ class FetchChecks(ScanBase):
                                                        continue
                                                filesdirlist.append(y + "/" + z)
                                # 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:
-                                       self.qatracker.add_error(
-                                               "file.size-fatal", "(%d KiB) 
%s/files/%s" % (
-                                                       mystat.st_size // 1024, 
xpkg, y))
+                               # File size over 20 KiB causes an error.
                                elif mystat.st_size > 20480:
                                        self.qatracker.add_error(
                                                "file.size", "(%d KiB) 
%s/files/%s" % (

diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
index 6f9a24544..0926e806c 100644
--- a/repoman/man/repoman.1
+++ b/repoman/man/repoman.1
@@ -393,7 +393,7 @@ executable bit
 File/dir name must be composed of only the following chars: a-zA-Z0-9._-+:
 .TP
 .B file.size
-Files in the files directory must be under 20k
+Files in the files directory must be under 20 KiB
 .TP
 .B inherit.missing
 Ebuild uses functions from an eclass but does not inherit it

Reply via email to