rpmlint/fix-TmpFilesCheck-pattern-match.diff

25 lines
948 B
Diff

From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Fri, 13 Nov 2015 12:56:25 +0100
Subject: [PATCH] fix TmpFilesCheck pattern match
need to use search() instead of match() find the systemd-tmpfiles call
---
TmpFilesCheck.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/TmpFilesCheck.py b/TmpFilesCheck.py
index 06be7bb..d1ef824 100644
--- a/TmpFilesCheck.py
+++ b/TmpFilesCheck.py
@@ -43,8 +43,8 @@ class TmpFilesCheck(AbstractCheck.AbstractCheck):
continue
pattern = re.compile(r'systemd-tmpfiles --create .*%s'%re.escape(fn))
- if (not postin or not pattern.match(postin)) and \
- (not prein or not pattern.match(prein)):
+ if (not postin or not pattern.search(postin)) and \
+ (not prein or not pattern.search(prein)):
printWarning(pkg,
'postin-without-tmpfile-creation', fn)