From 114d121001d8c3e901d5330b864d58870c6e917b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 7 Apr 2012 10:09:57 -0500 Subject: pkgdelta: use bsdtar -q option This matches the optimization made to repo-add in commit 8bbaf045b9ce 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 --- scripts/pkgdelta.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/pkgdelta.sh.in') diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in index 35be70ce..e8e54b8e 100644 --- a/scripts/pkgdelta.sh.in +++ b/scripts/pkgdelta.sh.in @@ -61,7 +61,7 @@ read_pkginfo() IFS=" " 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 eval "$line" if [[ -n $pkgname && -n $pkgver && -n $arch ]]; then -- cgit v1.2.3-54-g00ecf From 297916e6a2ad91bbd4cbd0173cac79937b93a393 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 6 Apr 2012 23:50:37 +0200 Subject: pkgdelta: exit 1 upon error This has been 0 since 9fa18d9a4b4ce5217842c71d8a45676e3fb9d3f4, but it doesn't makes sense because we are raising an error. Signed-off-by: Florian Pritz Signed-off-by: Dan McGee --- scripts/pkgdelta.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/pkgdelta.sh.in') diff --git a/scripts/pkgdelta.sh.in b/scripts/pkgdelta.sh.in index e8e54b8e..5fcc5be4 100644 --- a/scripts/pkgdelta.sh.in +++ b/scripts/pkgdelta.sh.in @@ -136,12 +136,12 @@ fi if [[ ! -f $1 ]]; then error "$(gettext "File '%s' does not exist")" "$1" - exit 0 + exit 1 fi if [[ ! -f $2 ]]; then error "$(gettext "File '%s' does not exist")" "$2" - exit 0 + exit 1 fi if ! type xdelta3 &>/dev/null; then -- cgit v1.2.3-54-g00ecf