mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
pkgdelta: fix improper passing of file argument
Looks like I hosed this pretty hard in 5a5e712c749edb8. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
63f04177c3
commit
6c870953c5
@ -75,6 +75,7 @@ isnumeric() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
read_pkginfo() {
|
read_pkginfo() {
|
||||||
|
unset pkgver pkgname arch
|
||||||
while IFS='=' read -r field value; do
|
while IFS='=' read -r field value; do
|
||||||
# skip comments and invalid lines
|
# skip comments and invalid lines
|
||||||
[[ $field = '#'* || -z $value ]] && continue
|
[[ $field = '#'* || -z $value ]] && continue
|
||||||
@ -82,10 +83,10 @@ read_pkginfo() {
|
|||||||
# skip lines which aren't fields we care about
|
# skip lines which aren't fields we care about
|
||||||
[[ $field != @(pkgver|pkgname|arch) ]] || continue
|
[[ $field != @(pkgver|pkgname|arch) ]] || continue
|
||||||
|
|
||||||
declare "$field=$value"
|
declare -g "${field% }=${value# }"
|
||||||
|
|
||||||
[[ $pkgname && $pkgver && $arch ]] && return 0
|
[[ $pkgname && $pkgver && $arch ]] && return 0
|
||||||
done
|
done < <(bsdtar -xOqf "$1" .PKGINFO 2>/dev/null)
|
||||||
|
|
||||||
error "$(gettext "Invalid package file '%s'.")" "$1"
|
error "$(gettext "Invalid package file '%s'.")" "$1"
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user