checkapk: handle + in pkgname

the pkgname is passed to awk, and + matches in regex, so it fails to
match the actual package name.

closes #10077
This commit is contained in:
psykose 2023-05-17 07:16:29 +00:00 committed by alice
parent 72fa67ca7f
commit 59caf9e11e
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ for i in $pkgname $subpackages; do
# For our local repo (newsize) apk info might return multiple packages, e.g. if different
# version of the package where build previously. Filter out this specific pkgver using awk.
newsize=$(apk info --repositories-file /dev/null --repository "$REPODEST"/$repo --size $_pkgname | \
awk "/^$pkg/ { found = 1 } /^[0-9]+/ { if (found) { print \$0; exit } }")
awk "/^${pkg//+/\\+}/ { found = 1 } /^[0-9]+/ { if (found) { print \$0; exit } }")
oldsize=$(apk info --repositories-file $tmpdir/repositories --size $_pkgname | awk '/^[0-9]+/ { print $0 }' | head -1)
if [ "$oldsize" = "$newsize" ]; then