diff options
author | Maxim Andersson <thesilentboatman@gmail.com> | 2014-09-29 01:06:00 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-09-30 04:57:05 +0200 |
commit | 699937e94d0f9614474e50bf2a77acb4a4619ab0 (patch) | |
tree | 9493f5dcad003bbf9849b388ba571a4ae96d95a7 | |
parent | cb9489119e15425eabdaa1e82a82c8879720b2a5 (diff) | |
download | pacman-699937e94d0f9614474e50bf2a77acb4a4619ab0.tar.gz pacman-699937e94d0f9614474e50bf2a77acb4a4619ab0.tar.xz |
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 <thesilentboatman@gmail.com>
-rw-r--r-- | contrib/paccache.sh.in | 7 |
1 files changed, 6 insertions, 1 deletions
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++] |