pkgdelta: use bsdtar -q option
This matches the optimization made to repo-add in commit 8bbaf045b9
way back in 2009. We don't need to read the whole package file to ensure
multiple .PKGINFO entries don't exist, as well-formed packages should
have this file first in the archive.
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
391769ff89
commit
114d121001
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ read_pkginfo()
|
||||||
IFS="
|
IFS="
|
||||||
"
|
"
|
||||||
local line var val
|
local line var val
|
||||||
for line in $(bsdtar -xOf "$1" .PKGINFO 2>/dev/null |
|
for line in $(bsdtar -xOqf "$1" .PKGINFO 2>/dev/null |
|
||||||
grep -v "^#" | sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do
|
grep -v "^#" | sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do
|
||||||
eval "$line"
|
eval "$line"
|
||||||
if [[ -n $pkgname && -n $pkgver && -n $arch ]]; then
|
if [[ -n $pkgname && -n $pkgver && -n $arch ]]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue