From f598b3eb2cd2f9f29b5104ea8aa62fe2d2df832e Mon Sep 17 00:00:00 2001 From: Aaron Schaefer Date: Tue, 13 Jan 2009 17:59:33 -0500 Subject: [PATCH] makepkg: use INTEGRITY_CHECK only for generation of checksums Signed-off-by: Aaron Schaefer --- scripts/makepkg.sh.in | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 3e0781f..31f8727 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -547,11 +547,13 @@ check_checksums() { exit 1 # $E_MISSING_PROGRAM fi + local correlation=0 local integ required for integ in md5 sha1 sha256 sha384 sha512; do local integrity_sums=($(eval echo "\${${integ}sums[@]}")) if [ ${#integrity_sums[@]} -eq ${#source[@]} ]; then msg "$(gettext "Validating source files with %s...")" "${integ}sums" + correlation=1 local errors=0 local idx=0 local file @@ -585,16 +587,15 @@ check_checksums() { error "$(gettext "One or more files did not pass the validity check!")" exit 1 # TODO: error code fi - else - for required in ${INTEGRITY_CHECK[@]}; do - required="$(echo $required | tr '[:upper:]' '[:lower:]')" - if [ "$integ" = "$required" ]; then - warning "$(gettext "Integrity checks (%s) are missing or incomplete.")" "$integ" - break - fi - done + elif [ ${#integrity_sums[@]} -gt 0 ]; then + warning "$(gettext "Integrity checks (%s) are incomplete.")" "$integ" fi done + + if [ $correlation -eq 0 ]; then + error "$(gettext "Integrity checks are missing or incomplete!")" + exit 1 # TODO: error code + fi } extract_sources() { -- 1.6.1