From 699937e94d0f9614474e50bf2a77acb4a4619ab0 Mon Sep 17 00:00:00 2001 From: Maxim Andersson Date: Mon, 29 Sep 2014 01:06:00 +0200 Subject: paccache: parse_filename bug fix Filenames got parsed wrongly, causing whitelist- and blacklist-checks to always return false. Caused by 8122fae51a when full path names to pkgs were introduced. Signed-off-by: Maxim Andersson --- contrib/paccache.sh.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/paccache.sh.in b/contrib/paccache.sh.in index eba315c7..71aee237 100644 --- a/contrib/paccache.sh.in +++ b/contrib/paccache.sh.in @@ -56,9 +56,14 @@ pkgfilter() { # script after the block of awk. awk -v keep="$1" -v scanarch="$2" ' + function basename(str) { + sub(".*/", "", str); + return str; + } + function parse_filename(filename, parts, count, i, pkgname, arch) { - count = split(filename, parts, "-") + count = split(basename(filename), parts, "-") i = 1 pkgname = parts[i++] -- cgit v1.2.3-24-g4f1b