[PATCH] paccache: Skip .sig files when globbing candidates for removal

Maxim Baz lists.archlinux at maximbaz.com
Thu Feb 22 23:21:11 UTC 2018


Basically allow any extension after '.tar' except '.sig'.
This is needed to correctly count the possible candidates for removal.
Signature files are correctly considered later in the script.
Fixes FS#57503

Signed-off-by: Maxim Baz <git at maximbaz.com>
---
 src/paccache.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/paccache.sh.in b/src/paccache.sh.in
index 49680be..135954f 100644
--- a/src/paccache.sh.in
+++ b/src/paccache.sh.in
@@ -308,7 +308,7 @@ for cachedir in "${cachedirs[@]}"; do
 	# note that these results are returned in an arbitrary order from awk, but
 	# they'll be resorted (in summarize) iff we have a verbosity level set.
 	IFS=$'\n' read -r -d '' -a cand < \
-		<(printf '%s\n' "$PWD"/*.pkg.tar?(.+([^.])) | pacsort --files |
+		<(printf '%s\n' "$PWD"/*.pkg.tar!(*.sig) | pacsort --files |
 			pkgfilter "$keep" "$scanarch" \
 				"${#whitelist[*]}" "${whitelist[@]}" \
 				"${#blacklist[*]}" "${blacklist[@]}")
-- 
2.16.2


More information about the pacman-contrib mailing list