From 2ffb67d3c8e7ef922dbb9e897c8de8722a5be5de Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 May 2017 16:21:08 +0200 Subject: bin/get-package-updates: only search for PKGBUILD if no cached values available --- bin/get-package-updates | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/get-package-updates b/bin/get-package-updates index 71f379c..355166c 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -126,13 +126,6 @@ rm -f "${work_dir}/build-order" touch "${work_dir}/build-order" while read -r package git_revision mod_git_revision repository; do - PKGBUILD="$(find_pkgbuild "${package}" "${repository}")" - - if [ ! -r "${PKGBUILD}" ]; then - echo "can't find PKGBUILD to package '${package}' from repository '${repository}': '${PKGBUILD}'" - exit 1 - fi - # delete cached values of old versions of this PKGBUILD ls -1 "${work_dir}/package-infos/${package}."* 2> /dev/null | \ sed 's|^.*/||' | \ @@ -147,6 +140,13 @@ while read -r package git_revision mod_git_revision repository; do [ ! -e "${work_dir}/package-infos/${package}.${git_revision}.${new_repo_revisions["archlinux32"]}.needs" ] || \ [ ! -e "${work_dir}/package-infos/${package}.${git_revision}.${new_repo_revisions["archlinux32"]}.packages" ]; then + PKGBUILD="$(find_pkgbuild "${package}" "${repository}")" + + if [ ! -r "${PKGBUILD}" ]; then + echo "can't find PKGBUILD to package '${package}' from repository '${repository}': '${PKGBUILD}'" + exit 1 + fi + ( cd "${PKGBUILD%/*}" apply_package_customizations @@ -221,6 +221,7 @@ echo 'Now actually sort it.' awk '{print $5 " " $7 " " $8 " " $9}' > \ "${work_dir}/build-list.new.new" +rm --one-file-system -rf "${work_dir}/build-order.loops.new" mkdir "${work_dir}/build-order.loops.new" if [ -s "${work_dir}/tsort.error" ]; then -- cgit v1.2.3-70-g09d2