index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Levente Polyak <anthraxx@archlinux.org> | 2019-12-03 01:14:35 +0100 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2019-12-05 22:50:11 +0100 |
commit | f20435643f55c37e3f8274a03e7fe5e052dc8dd9 (patch) | |
tree | 2e84688d1a28dadf89f6e5c35d7ab9d46d88b984 /makechrootpkg.in | |
parent | 8d99df602d6e5fc377a37f67d0e5ce74c8facecd (diff) |
-rw-r--r-- | makechrootpkg.in | 15 |
diff --git a/makechrootpkg.in b/makechrootpkg.in index a0a95a7..dfea18c 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -387,17 +387,28 @@ if (( ret != 0 )); then else if (( run_checkpkg )); then msg "Running checkpkg" - remotepkgs=($(pacman -Syddp --logfile /dev/null "${pkgnames[@]}"|grep '://')) + + # sync off-site databases for up-to-date queries + trap 'rm -rf $dbpath; cleanup' EXIT INT TERM QUIT + dbpath=$(mktemp -d --tmpdir makechrootpkg-database.XXXXXXXXXX) + mkdir -p "$dbpath" + pacman -Sy --dbpath "$dbpath" --logfile /dev/null + + # query current package locations + remotepkgs=($(pacman -Sddp --dbpath "$dbpath" --logfile /dev/null "${pkgnames[@]}")) if (( $? )); then warning "Skipped checkpkg due to missing repo packages" exit 0 fi + + # download package files if any non-local location exists for remotepkg in "${remotepkgs[@]}"; do [[ $remotepkg == file://* ]] && continue msg2 "Downloading current versions" - pacman --noconfirm -Swdd --logfile /dev/null "${pkgnames[@]}" + pacman --noconfirm -Swdd --dbpath "$dbpath" --logfile /dev/null "${pkgnames[@]}" break done + msg2 "Checking packages" sudo -u "$makepkg_user" checkpkg --rmdir --warn fi |