index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-10-08 10:36:58 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-08 10:36:58 +0200 |
commit | 9e2756e7423cee9237ed22b4f977dea7f4dcdf0e (patch) | |
tree | ef38363148fb2d399a04658e9799f78fa2475f52 | |
parent | 00cd1c1f5f1373b4947792cec4b054450c949202 (diff) |
-rwxr-xr-x | bin/build-packages | 2 | ||||
-rwxr-xr-x | lib/common-functions | 22 |
diff --git a/bin/build-packages b/bin/build-packages index 228f45f..b4b5dcd 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -405,7 +405,7 @@ while [ "${count}" -ne 0 ] && \ continue fi # download it from sources.archlinux32.org by its hash - if ! download_sources_by_hash "${package}" "${repository}" "${git_revision}" "${mod_git_revision}"; then + if ! download_sources_by_hash; then # we can't improve anything, if no source was downloadable continue fi diff --git a/lib/common-functions b/lib/common-functions index 34a3bf6..b29379b 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -527,35 +527,25 @@ extract_source_directory() { } -# download_sources_by_hash $package $repository $git_revision $git_mod_revision +# download_sources_by_hash # try to download all sources by their hash into the current directory # returns 0 if any source was downloaded and 1 otherwise download_sources_by_hash() { - local package="$1" - local repository="$2" - local git_revision="$3" - local git_mod_revision="$4" - local return_value=1 local tmp_dir local sum_type local arch_suffix - tmp_dir=$(mktemp -d 'tmp.common-functions.download_sources_by_hash.XXXXXXXXXX' --tmpdir) - - if ! make_source_info "${package}" "${repository}" "${git_revision}" "${git_mod_revision}" "${tmp_dir}/.SRCINFO"; then - >&2 echo 'download_sources_by_hash: make_source_info failed.' - rm -rf --one-file-system "${tmp_dir}" + if [ ! -f 'PKGBUILD' ]; then + >&2 echo 'No PKGBUILD found - download_sources_by_hash() must be run from the source directory.' return 1 fi - if ! [ -s "${tmp_dir}/.SRCINFO" ]; then - >&2 echo 'download_sources_by_hash: ".SRCINFO" has not been created by make_source_info.' - rm -rf --one-file-system "${tmp_dir}" - return 1 - fi + tmp_dir=$(mktemp -d 'tmp.common-functions.download_sources_by_hash.XXXXXXXXXX' --tmpdir="$(pwd)") + + makepkg --printsrcinfo > "${tmp_dir}/.SRCINFO" for arch_suffix in '' '_i486' '_i686'; do for sum_type in 'md5sum' 'sha1sum' 'sha256sum' 'sha512sum'; do |