SHA256
1
0
forked from pool/rpmlint
rpmlint/remove-files-attr-not-set-check.diff
Ludwig Nussel 5ad6c8a066 - Update to version 13.2+git20150519.278efdf:
+ add ghost file checks
  + print names of failed tests

- fix update_git.sh
- make sure tmpfiles are listed in %files
  (add-check-for-tmpfiles-created-at-r.diff)
- don't complain about missingok ghost files
  (fix-ghost-file-handling.diff)
- remove obsolete check for %defattr in spec files
  (remove-files-attr-not-set-check.diff)

OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=328
2015-05-19 12:23:59 +00:00

56 lines
2.2 KiB
Diff

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
index ace044c..4842bef 100644
--- a/SpecCheck.py
+++ b/SpecCheck.py
@@ -63,7 +63,6 @@ biarch_package_regex = re.compile(DEFAULT_BIARCH_PACKAGES)
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
@@ -230,9 +228,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
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
@@ -470,14 +465,6 @@ class SpecCheck(AbstractCheck.AbstractCheck):
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