[pacman-dev] [PATCH] 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> --- scripts/libmakepkg/util/pkgbuild.sh.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/libmakepkg/util/pkgbuild.sh.in b/scripts/libmakepkg/util/pkgbuild.sh.in index 1a4567d..2157b56 100644 --- a/scripts/libmakepkg/util/pkgbuild.sh.in +++ b/scripts/libmakepkg/util/pkgbuild.sh.in @@ -195,10 +195,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 -- 2.9.0
On 24/06/16 00:18, Jack O'Connor wrote:
`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>
Looks good. Thanks, Allan
participants (2)
-
Allan McRae
-
Jack O'Connor