summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAaron Schaefer <aaron@elasticdog.com>2009-01-13 17:59:33 -0500
committerDan McGee <dan@archlinux.org>2009-01-13 19:50:38 -0600
commite3a06961f6363820f11112d18a62e6201d06a13a (patch)
treed8382d46ca0f74e329eabf1f253211d53eef5e72 /scripts
parentd7345da5ba798bdcc311d3f044e1837697ecc566 (diff)
downloadpacman-e3a06961f6363820f11112d18a62e6201d06a13a.tar.xz
makepkg: use INTEGRITY_CHECK only for generation of checksums
Signed-off-by: Aaron Schaefer <aaron@elasticdog.com> [Dan: fail if checksum array is incorrectly sized] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index da7e71f3..baa9c57b 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
@@ -586,15 +588,15 @@ check_checksums() {
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
+ error "$(gettext "Integrity checks (%s) differ in size from the source array.")" "$integ"
+ exit 1 # TODO: error code
fi
done
+
+ if [ $correlation -eq 0 ]; then
+ error "$(gettext "Integrity checks are missing.")"
+ exit 1 # TODO: error code
+ fi
}
extract_sources() {