2015-05-19 14:23:59 +02:00
|
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
|
|
Date: Tue, 19 May 2015 13:24:34 +0200
|
|
|
|
Subject: [PATCH] remove files-attr-not-set check
|
|
|
|
|
|
|
|
%defattr(-,root,root) is default since rpm 4.4, released > 10
|
|
|
|
years go so it's about time to remove that check
|
|
|
|
---
|
|
|
|
SpecCheck.py | 13 -------------
|
|
|
|
1 file changed, 13 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/SpecCheck.py b/SpecCheck.py
|
2015-11-26 11:24:13 +01:00
|
|
|
index 5149dc3..e00c0a8 100644
|
2015-05-19 14:23:59 +02:00
|
|
|
--- a/SpecCheck.py
|
|
|
|
+++ b/SpecCheck.py
|
2015-11-26 11:24:13 +01:00
|
|
|
@@ -64,7 +64,6 @@ biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES)
|
2015-05-19 14:23:59 +02:00
|
|
|
hardcoded_lib_path_exceptions_regex = re.compile(Config.getOption('HardcodedLibPathExceptions', DEFAULT_HARDCODED_LIB_PATH_EXCEPTIONS))
|
|
|
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
|
|
|
libdir_regex = re.compile('%{?_lib(?:dir)?\}?\\b')
|
|
|
|
-comment_or_empty_regex = re.compile('^\s*(#|$)')
|
|
|
|
defattr_regex = re.compile('^\s*%defattr\\b')
|
|
|
|
attr_regex = re.compile('^\s*%attr\\b')
|
|
|
|
suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
|
|
|
|
@@ -179,7 +178,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
|
|
|
patch_fuzz_override = False
|
|
|
|
indent_spaces = 0
|
|
|
|
indent_tabs = 0
|
|
|
|
- files_has_defattr = False
|
|
|
|
section = {}
|
|
|
|
# None == main package
|
|
|
|
current_package = None
|
2015-11-26 11:24:13 +01:00
|
|
|
@@ -231,9 +229,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
2015-05-19 14:23:59 +02:00
|
|
|
|
|
|
|
if section_marker:
|
|
|
|
|
|
|
|
- if current_section == 'files':
|
|
|
|
- files_has_defattr = False
|
|
|
|
-
|
|
|
|
if not is_lib_pkg and lib_package_regex.search(line):
|
|
|
|
is_lib_pkg = True
|
|
|
|
|
2015-11-26 11:24:13 +01:00
|
|
|
@@ -471,14 +466,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
|
2015-05-19 14:23:59 +02:00
|
|
|
|
|
|
|
if current_section == 'files':
|
|
|
|
|
|
|
|
- if not comment_or_empty_regex.search(line) and not \
|
|
|
|
- (ifarch_regex.search(line) or if_regex.search(line) or
|
|
|
|
- endif_regex.search(line)):
|
|
|
|
- if defattr_regex.search(line):
|
|
|
|
- files_has_defattr = True
|
|
|
|
- elif not (files_has_defattr or attr_regex.search(line)):
|
|
|
|
- printWarning(pkg, 'files-attr-not-set')
|
|
|
|
-
|
|
|
|
# TODO: check scriptlets for these too?
|
|
|
|
if package_noarch.get(current_package) or \
|
|
|
|
(current_package not in package_noarch and
|