Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack O'Connor <oconnor663@gmail.com>2016-08-01 13:06:00 +1000
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-05-08 23:27:41 -0400
commite20a502c40d1eca529bd2e86d29fee268f2d78ff (patch)
tree8ed801000ba4d3297b717bbca6f8fd7bc90e8544
parent2e7162fe8785702ad409af9dad352a8bef24a65e (diff)
libmakepkg: look for architecture-specific hashes in get_integlist
`makepkg -g` looks for existing checksums in the PKGBUILD file, so that it can generate new sums of the same type. Previously it only checked variables of the form "sha256sums", and not "sha256sums_x86_64". That meant it would always fall back to MD5 for packages with only architecture-specific sources. This change makes it look at architecture-specific checksums too to determine the type. Signed-off-by: Jack O'Connor <oconnor663@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit 56de155296a57fb3fcd8ae64aed00fd18fe2f22e) [andrew@archlinux.org: patch adapted to makepkg.sh.in]
-rw-r--r--scripts/makepkg.sh.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b2be4a0b..7fd76b20 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -337,10 +337,21 @@ get_integlist() {
local integlist=()
for integ in "${known_hash_algos[@]}"; do
+ # check for e.g. "sha256sums"
local sumname="${integ}sums[@]"
if [[ -n ${!sumname} ]]; then
integlist+=("$integ")
+ continue
fi
+
+ # check for e.g. "sha256sums_x86_64"
+ for a in "${arch[@]}"; do
+ local sumname="${integ}sums_${a}[@]"
+ if [[ -n ${!sumname} ]]; then
+ integlist+=("$integ")
+ break
+ fi
+ done
done
if (( ${#integlist[@]} > 0 )); then