Retry stale offline package downloads
This commit is contained in:
1 parent
a274a2c56e
commit
3544261e8c
1 file changed
+13
-2
+13
-2
@@ -170,8 +170,19 @@ if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p /tmp/offlinedb
|
mkdir -p /tmp/offlinedb
|
||||||
pacman --config /configs/pacman-online-${OMARCHY_MIRROR}.conf --noconfirm -Syw \
|
download_offline_packages() {
|
||||||
"${all_packages[@]}" --cachedir "$offline_mirror_dir/" --dbpath /tmp/offlinedb --needed
|
pacman --config /configs/pacman-online-${OMARCHY_MIRROR}.conf --noconfirm -Syw \
|
||||||
|
"${all_packages[@]}" --cachedir "$offline_mirror_dir/" --dbpath /tmp/offlinedb --needed
|
||||||
|
}
|
||||||
|
|
||||||
|
# A repository may occasionally republish a package without changing its
|
||||||
|
# filename. Pacman detects that the persistent cached copy no longer matches
|
||||||
|
# the refreshed repository checksum and deletes it, but still fails the
|
||||||
|
# transaction. Retry once so the now-missing package is downloaded.
|
||||||
|
if ! download_offline_packages; then
|
||||||
|
echo "Offline package download failed; retrying after pacman cleaned invalid cached files..." >&2
|
||||||
|
download_offline_packages
|
||||||
|
fi
|
||||||
|
|
||||||
prune_stale_package_versions() {
|
prune_stale_package_versions() {
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
|
|||||||
Reference in new issue
Block a user