From efb61ae07bfe21bda5b323364a2b38ece01ba40a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Mon, 26 Jun 2017 00:03:37 +0200 Subject: [PATCH] support/check-package: don't check filenames of hashes Currently, we check that the filenames in hash lists do not contain a slash '/' character, because all we are checking so far are the downloaded archives, and we explicitly need the filename to not contain a directory component at all. However, we're soon to also check the hashes of the license files in packages sources, and those license files may be at any arbitrary directory-depth in the packages source tree. [Peter: Remove reference to files with same basename] Signed-off-by: "Yann E. MORIN" Cc: Luca Ceresoli Cc: Peter Korsgaard Cc: Rahul Bedarkar Cc: Ricardo Martincoski Acked-by: Ricardo Martincoski Signed-off-by: Peter Korsgaard --- utils/checkpackagelib/lib_hash.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/utils/checkpackagelib/lib_hash.py b/utils/checkpackagelib/lib_hash.py index 10b27482bc..c4d055ee22 100644 --- a/utils/checkpackagelib/lib_hash.py +++ b/utils/checkpackagelib/lib_hash.py @@ -17,22 +17,6 @@ def _empty_line_or_comment(text): return text.strip() == "" or text.startswith("#") -class HashFilename(_CheckFunction): - def check_line(self, lineno, text): - if _empty_line_or_comment(text): - return - - fields = text.split() - if len(fields) < 3: - return - - if '/' in fields[2]: - return ["{}:{}: use filename without directory component" - " ({}#adding-packages-hash)" - .format(self.filename, lineno, self.url_to_manual), - text] - - class HashNumberOfFields(_CheckFunction): def check_line(self, lineno, text): if _empty_line_or_comment(text):