forked from pool/rpmlint
Ludwig Nussel
5ad6c8a066
+ 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
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Thu, 9 Apr 2015 12:01:29 +0200
|
|
Subject: [PATCH] fix ghost file handling
|
|
|
|
always take into consideration the missingok files when checking for
|
|
missing ghost files.
|
|
---
|
|
PostCheck.py | 18 +++++++++---------
|
|
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/PostCheck.py b/PostCheck.py
|
|
index a87964a..aeb18d3 100644
|
|
--- a/PostCheck.py
|
|
+++ b/PostCheck.py
|
|
@@ -123,15 +123,15 @@ class PostCheck(AbstractCheck.AbstractCheck):
|
|
if ghost_files:
|
|
postin = pkg[rpm.RPMTAG_POSTIN]
|
|
prein = pkg[rpm.RPMTAG_PREIN]
|
|
- if not postin and not prein:
|
|
- printWarning(pkg, 'ghost-files-without-postin')
|
|
- else:
|
|
- for f in ghost_files:
|
|
- if (not postin or f not in postin) and \
|
|
- (not prein or f not in prein) and \
|
|
- f not in pkg.missingOkFiles():
|
|
- printWarning(pkg,
|
|
- 'postin-without-ghost-file-creation', f)
|
|
+ for f in ghost_files:
|
|
+ if f in pkg.missingOkFiles():
|
|
+ continue
|
|
+ if not postin and not prein:
|
|
+ printWarning(pkg, 'ghost-files-without-postin')
|
|
+ if (not postin or f not in postin) and \
|
|
+ (not prein or f not in prein):
|
|
+ printWarning(pkg,
|
|
+ 'postin-without-ghost-file-creation', f)
|
|
|
|
def check_aux(self, pkg, files, prog, script, tag, prereq):
|
|
if script:
|