Fix arch build #92
@@ -1,9 +1,11 @@
|
|||||||
FROM archlinux
|
FROM archlinux:latest
|
||||||
|
|
||||||
ENV TERM=xterm
|
ENV TERM=xterm
|
||||||
ENV CC="ccache gcc"
|
ENV CC="ccache gcc"
|
||||||
|
|
||||||
RUN pacman -Syu --noconfirm
|
RUN pacman-key --refresh-keys
|
||||||
|
jabber.developer marked this conversation as resolved
Outdated
|
|||||||
|
RUN pacman -Syyu --noconfirm
|
||||||
|
|
||||||
# reflector is optional - if it fails due to network issues, continue with default mirrorlist
|
# reflector is optional - if it fails due to network issues, continue with default mirrorlist
|
||||||
RUN pacman -S --needed --noconfirm reflector && \
|
RUN pacman -S --needed --noconfirm reflector && \
|
||||||
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
|
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
|
||||||
|
jabber.developer marked this conversation as resolved
Outdated
jabber.developer2
commented
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: 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 <path> together:
RUN pacman -S --needed --noconfirm reflector && \
(reflector --latest 20 --protocol https --sort rate --save /etc/pacman.d/mirrorlist || true)
jabber.developer
commented
It was done to destroy previous cache. Reverted. It was done to destroy previous cache. Reverted.
|
|||||||
|
|||||||
Reference in New Issue
Block a user
Double 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