FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-26-2012, 10:58 PM
Allan McRae
 
Default makepkg: skip integrity checking early

If "SKIP" is provided for an integrity check, abort checking as soon
as possible.

Signed-off-by: Allan McRae <allan@archlinux.org>
---
scripts/makepkg.sh.in | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 2a8866f..985bbbd 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -736,6 +736,12 @@ check_checksums() {
file="$(get_filename "$file")"
printf "%s" " $file ... " >&2

+ if [[ ${integrity_sums[$idx]} = 'SKIP' ]]; then
+ echo "$(gettext "Skipped")" >&2
+ idx=$((idx + 1))
+ continue
+ fi
+
if ! file="$(get_filepath "$file")"; then
printf -- "$(gettext "NOT FOUND")
" >&2
errors=1
@@ -743,18 +749,14 @@ check_checksums() {
fi

if (( $found )) ; then
- if [[ ${integrity_sums[$idx]} = 'SKIP' ]]; then
- echo "$(gettext "Skipped")" >&2
+ local expectedsum=$(tr '[:upper:]' '[:lower:]' <<< "${integrity_sums[$idx]}")
+ local realsum="$(openssl dgst -${integ} "$file")"
+ realsum="${realsum##* }"
+ if [[ $expectedsum = "$realsum" ]]; then
+ printf -- "$(gettext "Passed")
" >&2
else
- local expectedsum=$(tr '[:upper:]' '[:lower:]' <<< "${integrity_sums[$idx]}")
- local realsum="$(openssl dgst -${integ} "$file")"
- realsum="${realsum##* }"
- if [[ $expectedsum = "$realsum" ]]; then
- printf -- "$(gettext "Passed")
" >&2
- else
- printf -- "$(gettext "FAILED")
" >&2
- errors=1
- fi
+ printf -- "$(gettext "FAILED")
" >&2
+ errors=1
fi
fi

--
1.7.11.1
 

Thread Tools




All times are GMT. The time now is 07:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org