forked from pool/rpmlint
- fix TmpFilesCheck not finding pattern in the full script
(fix-TmpFilesCheck-pattern-match.diff) OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=347
This commit is contained in:
parent
0eb46b4494
commit
8ff8adb7cd
24
fix-TmpFilesCheck-pattern-match.diff
Normal file
24
fix-TmpFilesCheck-pattern-match.diff
Normal file
@ -0,0 +1,24 @@
|
||||
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)
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 12:24:38 UTC 2015 - lnussel@suse.de
|
||||
|
||||
- fix TmpFilesCheck not finding pattern in the full script
|
||||
(fix-TmpFilesCheck-pattern-match.diff)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 9 12:40:53 UTC 2015 - krahmer@suse.com
|
||||
|
||||
|
@ -110,6 +110,7 @@ Patch51: add-check-for-tmpfiles-created-at-r.diff
|
||||
Patch52: fix-ghost-file-handling.diff
|
||||
Patch53: remove-files-attr-not-set-check.diff
|
||||
Patch54: move-ghost-file-check-to-TmpFilesCh.diff
|
||||
Patch55: fix-TmpFilesCheck-pattern-match.diff
|
||||
# PATCHLIST END
|
||||
# BuildArch must at the and. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766
|
||||
BuildArch: noarch
|
||||
|
@ -30,6 +30,8 @@ trap cleanup EXIT
|
||||
GIT_DIR=`mktemp -d --tmpdir update_git.XXXXXXXXXX`
|
||||
CMP_DIR=`mktemp -d --tmpdir update_git.XXXXXXXXXX`
|
||||
|
||||
rm -f .update_git.*
|
||||
|
||||
if [ -d "$GIT_LOCAL_TREE" ]; then
|
||||
echo "Processing $GIT_BRANCH branch of local git tree, using tag:" \
|
||||
"$GIT_UPSTREAM_TAG"
|
||||
@ -87,7 +89,7 @@ for i in $CMP_DIR/*.tmp; do
|
||||
else
|
||||
mv "$CMP_DIR/$newname" "$localname"
|
||||
let ADDED_COUNT+=1
|
||||
echo " $localname" >> qemu.changes.added
|
||||
echo " $localname" >> .update_git.changes.added
|
||||
osc add "$localname"
|
||||
fi
|
||||
done
|
||||
@ -104,7 +106,7 @@ for patch in *.diff; do
|
||||
if [ -z "$keep" ]; then
|
||||
osc rm --force $patch
|
||||
let DELETED_COUNT+=1
|
||||
echo " $patch" >> qemu.changes.deleted
|
||||
echo " $patch" >> .update_git.changes.deleted
|
||||
fi
|
||||
done
|
||||
|
||||
@ -128,25 +130,20 @@ for package in rpmlint; do
|
||||
done < $package.spec > $package.spec.new
|
||||
mv $package.spec.new $package.spec
|
||||
|
||||
if [ -e qemu.changes.deleted ]; then
|
||||
if [ -e .update_git.changes.deleted ]; then
|
||||
echo "* Patches dropped:" >> $package.changes.proposed
|
||||
cat qemu.changes.deleted >> $package.changes.proposed
|
||||
cat .update_git.changes.deleted >> $package.changes.proposed
|
||||
fi
|
||||
if [ -e qemu.changes.added ]; then
|
||||
if [ -e .update_git.changes.added ]; then
|
||||
echo "* Patches added:" >> $package.changes.proposed
|
||||
cat qemu.changes.added >> $package.changes.proposed
|
||||
cat .update_git.changes.added >> $package.changes.proposed
|
||||
fi
|
||||
if [ -e $package.changes.proposed ]; then
|
||||
osc vc --file=$package.changes.proposed $package
|
||||
rm -f $package.changes.proposed
|
||||
fi
|
||||
done
|
||||
if [ -e qemu.changes.deleted ]; then
|
||||
rm -f qemu.changes.deleted
|
||||
fi
|
||||
if [ -e qemu.changes.added ]; then
|
||||
rm -f qemu.changes.added
|
||||
fi
|
||||
rm -f .update_git.*
|
||||
echo "git patch summary"
|
||||
echo " unchanged: $UNCHANGED_COUNT"
|
||||
echo " changed: $CHANGED_COUNT"
|
||||
|
Loading…
Reference in New Issue
Block a user