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

Maxim Baz lists.archlinux at maximbaz.com
Wed Feb 21 20:17:35 UTC 2018


Basically allow any extension after '.tar' except '.tar.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..94bedfa 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?(.+([^.])) | grep -v '\.sig$'
| pacsort --files |
             pkgfilter "$keep" "$scanarch" \
                 "${#whitelist[*]}" "${whitelist[@]}" \
                 "${#blacklist[*]}" "${blacklist[@]}")
-- 
2.16.2


More information about the pacman-contrib mailing list