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>
This commit is contained in:
parent
cb9489119e
commit
699937e94d
1 changed files with 6 additions and 1 deletions
|
@ -56,9 +56,14 @@ pkgfilter() {
|
||||||
# script after the block of awk.
|
# script after the block of awk.
|
||||||
|
|
||||||
awk -v keep="$1" -v scanarch="$2" '
|
awk -v keep="$1" -v scanarch="$2" '
|
||||||
|
function basename(str) {
|
||||||
|
sub(".*/", "", str);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
function parse_filename(filename, parts, count, i, pkgname, arch) {
|
function parse_filename(filename, parts, count, i, pkgname, arch) {
|
||||||
|
|
||||||
count = split(filename, parts, "-")
|
count = split(basename(filename), parts, "-")
|
||||||
|
|
||||||
i = 1
|
i = 1
|
||||||
pkgname = parts[i++]
|
pkgname = parts[i++]
|
||||||
|
|
Loading…
Add table
Reference in a new issue