index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-05-31 10:50:51 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-05-31 10:50:51 +0200 |
commit | cf8b959ce1cfeb8028ecd2e1b6b46c02256484f0 (patch) | |
tree | c8ca2870462cad5aeb0a3f5a668b1373d0acfa37 | |
parent | b3569484607d66823f7a6f90c21b7f0a4dae2f8c (diff) |
-rwxr-xr-x | bin/build-packages | 61 |
diff --git a/bin/build-packages b/bin/build-packages index d5e0657..e66afdb 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -136,7 +136,38 @@ while [ ${count} -ne 0 ]; do cd "${PKGBUILD%/*}" apply_package_customizations success=false - for mirrored_source in 'no' 'yes'; do + for mirrored_source in false true; do + + if ${mirror_source}; then + # maybe a missing source is/was the problem? + # try to download them from sources.archlinux.org/sources/$repo/$source + source_name="$( + makepkg --printsrcinfo | \ + sed -n ' + /^\s*\(epoch\|pkg\(base\|ver\|rel\)\) = /{s|^\s\+||;p} + /^pkgname = /q + ' | \ + sed ' + s|^pkgbase = \(.*\)$|0 \1-| + s|^epoch = \(.*\)$|1 \1:| + s|^pkgver = \(.*\)$|2 \1-| + s|^pkgrel = \(.*\)$|3 \1.src.tar.gz| + ' | \ + sort -k1n,1 | \ + sed ' + s|^[0-9] || + :a + N + s|\n[0-9] || + ta + ' + )" + git_repo="$(find_git_repository_to_package_repository "${repository}")" + if wget -nc -nd "https://sources.archlinux.org/sources/${git_repo}/${source_name}"; then + tar -xzkf "${source_name}" --exclude PKGBUILD --strip-components=1 || true + fi + fi + for parameters in '' '-c'; do rm -f *.pkg.tar.xz{,.sig} if staging-i686-build ${parameters}; then @@ -182,34 +213,6 @@ while [ ${count} -ne 0 ]; do if ${success}; then break fi - # maybe a missing source is/was the problem? - # try to download them from sources.archlinux.org/sources/$repo/$source - source_name="$( - makepkg --printsrcinfo | \ - sed -n ' - /^\s*\(epoch\|pkg\(base\|ver\|rel\)\) = /{s|^\s\+||;p} - /^pkgname = /q - ' | \ - sed ' - s|^pkgbase = \(.*\)$|0 \1-| - s|^epoch = \(.*\)$|1 \1:| - s|^pkgver = \(.*\)$|2 \1-| - s|^pkgrel = \(.*\)$|3 \1.src.tar.gz| - ' | \ - sort -k1n,1 | \ - sed ' - s|^[0-9] || - :a - N - s|\n[0-9] || - ta - ' - )" - git_repo="$(find_git_repository_to_package_repository "${repository}")" - if wget -nc -nd "https://sources.archlinux.org/sources/${git_repo}/${source_name}"; then - # TODO: somehow the build environment does not see the sources - we need to change that! - tar -xz --overwrite -f "${source_name}" - fi done if ! ${success}; then |