refactor(os): Retry pacman download on fail
This commit is contained in:
parent
eadbbea2fd
commit
08f33c33c7
17
setup.sh
17
setup.sh
@ -429,12 +429,18 @@ function update_pacman_db () {
|
||||
systemctl start reflector
|
||||
# In an ISO and for the minimal number of packages we need we do not
|
||||
# care about partial upgrades
|
||||
pacman -Syyuu --noconfirm
|
||||
while ! pacman -Syyuu --needed --noconfirm --downloadonly; do
|
||||
sleep 5
|
||||
done
|
||||
pacman -Syyuu --needed --noconfirm
|
||||
}
|
||||
|
||||
function install_pkgs () {
|
||||
#1.5
|
||||
printf -- '%s\n' 'Installing packages ...'
|
||||
while ! pacman -S --needed --noconfirm --downloadonly "${@}"; do
|
||||
sleep 5
|
||||
done
|
||||
pacman -S --needed --noconfirm "${@}"
|
||||
}
|
||||
|
||||
@ -763,7 +769,7 @@ function install_archlinux () {
|
||||
#1.12
|
||||
pacman_dl_parallel
|
||||
pacman_dont_check_space
|
||||
pacstrap /mnt \
|
||||
while ! pacstrap /mnt \
|
||||
base \
|
||||
base-devel \
|
||||
linux \
|
||||
@ -783,7 +789,9 @@ function install_archlinux () {
|
||||
bluez-utils \
|
||||
man-db \
|
||||
xdg-utils \
|
||||
xdg-user-dirs
|
||||
xdg-user-dirs; do
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
function gen_fstab () {
|
||||
@ -1295,6 +1303,9 @@ function install_os_in_chroot () {
|
||||
rm -rf '/etc/pacman.d/gnupg'
|
||||
pacman-key --init
|
||||
pacman-key --populate archlinux
|
||||
while ! pacman -S archlinux-keyring --noconfirm --downloadonly; do
|
||||
sleep 5
|
||||
done
|
||||
pacman -S archlinux-keyring --noconfirm
|
||||
|
||||
locale-gen
|
||||
|
Loading…
x
Reference in New Issue
Block a user