Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Add --disable-download-timeout to pacman
Browse files Browse the repository at this point in the history
Fixes timeout issue
  • Loading branch information
yoyossef committed Oct 18, 2023
1 parent 4c03303 commit 499cf8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ RUN echo -e "keyserver-options auto-key-retrieve" >> /etc/pacman.d/gnupg/gpg.con
# Cannot check space in chroot
sed -i '/CheckSpace/s/^/#/g' /etc/pacman.conf && \
pacman-key --init && \
pacman --noconfirm -Syyuu && \
pacman --noconfirm -S \
pacman --noconfirm -Syyuu --disable-download-timeout && \
pacman --noconfirm -S --disable-download-timeout \
arch-install-scripts \
btrfs-progs \
fmt \
Expand All @@ -22,7 +22,7 @@ RUN echo -e "keyserver-options auto-key-retrieve" >> /etc/pacman.d/gnupg/gpg.con
rust \
sudo \
&& \
pacman --noconfirm -S --needed git && \
pacman --noconfirm -S --disable-download-timeout --needed git && \
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
useradd build -G wheel -m && \
su - build -c "git clone https://aur.archlinux.org/pikaur.git /tmp/pikaur" && \
Expand All @@ -43,7 +43,7 @@ COPY manifest /manifest
# Freeze packages and overwrite with overrides when needed
RUN source /manifest && \
echo "Server=https://archive.archlinux.org/repos/${ARCHIVE_DATE}/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist && \
pacman --noconfirm -Syyuu; if [ -n "${PACKAGE_OVERRIDES}" ]; then wget --directory-prefix=/tmp/extra_pkgs ${PACKAGE_OVERRIDES}; pacman --noconfirm -U --overwrite '*' /tmp/extra_pkgs/*; rm -rf /tmp/extra_pkgs; fi
pacman --noconfirm -Syyuu --disable-download-timeout; if [ -n "${PACKAGE_OVERRIDES}" ]; then wget --directory-prefix=/tmp/extra_pkgs ${PACKAGE_OVERRIDES}; pacman --noconfirm -U --overwrite '*' /tmp/extra_pkgs/*; rm -rf /tmp/extra_pkgs; fi

USER build
ENV BUILD_USER "build"
Expand Down
6 changes: 3 additions & 3 deletions build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,22 @@ sed -i '/ParallelDownloads/s/^/#/g' /etc/pacman.conf
sed -i '/CheckSpace/s/^/#/g' /etc/pacman.conf
# update package databases
pacman --noconfirm -Syy
pacman --noconfirm --disable-download-timeout -Syy
# install kernel package
if [ "$KERNEL_PACKAGE_ORIGIN" == "local" ] ; then
pacman --noconfirm -U --overwrite '*' \
/own_pkgs/${KERNEL_PACKAGE}-*.pkg.tar.zst
else
pacman --noconfirm -S "${KERNEL_PACKAGE}" "${KERNEL_PACKAGE}-headers"
pacman --noconfirm --disable-download-timeout -S "${KERNEL_PACKAGE}" "${KERNEL_PACKAGE}-headers"
fi
# install own override packages
pacman --noconfirm -U --overwrite '*' /own_pkgs/*
rm -rf /var/cache/pacman/pkg
# install packages
pacman --noconfirm -S --overwrite '*' ${PACKAGES}
pacman --noconfirm --disable-download-timeout -S --overwrite '*' ${PACKAGES}
rm -rf /var/cache/pacman/pkg
# install AUR packages
Expand Down

0 comments on commit 499cf8c

Please sign in to comment.