Fix arch build #92
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/arch-build"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #93
2935d73b1bto07e9ff451107e9ff4511to8046a70ac48046a70ac4to847dc5e384@@ -4,3 +4,3 @@ENV CC="ccache gcc"RUN pacman -Syu --noconfirmRUN pacman -Syyu --noconfirm || trueDouble pacman -Syyu with no logic between attempts — IMPROVEMENT
Two identical RUN pacman -Syyu back-to-back: the first swallows errors, the second retries blindly. If the root cause is stale keys or a broken mirror, a plain retry won't help — and you pay for an extra Docker layer caching the full package DB twice.
Better: single RUN with targeted recovery:
RUN pacman -Syu --noconfirm || (pacman-key --refresh-keys && pacman -Syu --noconfirm)
Looks like this solution incorrect, may be we should try
RUN pacman-key --init && pacman-key --populate archlinux
RUN pacman -Syu --noconfirm
instead of
RUN pacman -Syu --noconfirm || (pacman-key --refresh-keys && pacman -Syu --noconfirm)
or use previous approach
@@ -7,3 +9,3 @@# reflector is optional - if it fails due to network issues, continue with default mirrorlistRUN pacman -S --needed --noconfirm reflector && \(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)(reflector --latest 20 --protocol https --save --sort rate /etc/pacman.d/mirrorlist || true)reflector argument order
--save expects a file path as its next argument. After the reorder, --save consumes --sort as the filename, breaking mirror selection silently (masked by || true).
Fix: keep --save together:
RUN pacman -S --needed --noconfirm reflector &&
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
It was done to destroy previous cache. Reverted.
@@ -8,2 +10,3 @@RUN pacman -S --needed --noconfirm reflector && \(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)(reflector --latest 20 --protocol https --save --sort rate /etc/pacman.d/mirrorlist || true)RUN export DEBUGINFOD_URLS="https://debuginfod.archlinux.org"RUN export does nothing across layers
Each RUN instruction executes in its own shell. export only affects that single process; subsequent RUN steps won't see the variable. Use ENV instead:
ENV DEBUGINFOD_URLS="https://debuginfod.archlinux.org"
Removed.
847dc5e384to37ca2de308