diff --git a/pkg/alpine/Dockerfile b/pkg/alpine/Dockerfile index c304e2daba..b3e800a981 100644 --- a/pkg/alpine/Dockerfile +++ b/pkg/alpine/Dockerfile @@ -27,6 +27,7 @@ RUN [ -f /etc/apk/repositories.upstream ] || mv /etc/apk/repositories /etc/apk/r RUN [ -f /etc/apk/cache.url ] || echo https://dl-cdn.alpinelinux.org/alpine > /etc/apk/cache.url RUN for repo in main community testing; do \ for p in */"$repo"; do \ + if [ ! -f "$p" ]; then echo "skipping $p"; continue; fi &&\ packages="" &&\ if [ -f "$p" ]; then packages="$packages $(cat "$p")"; fi &&\ if [ -f "$p.$(apk --print-arch)" ]; then packages="$packages $(cat "$p.$(apk --print-arch)")"; fi &&\ diff --git a/pkg/alpine/build-cache.sh b/pkg/alpine/build-cache.sh index d3aeeb3239..b27b5e294f 100755 --- a/pkg/alpine/build-cache.sh +++ b/pkg/alpine/build-cache.sh @@ -8,7 +8,13 @@ bail() { [ "$#" -gt 2 ] || bail "Usage: $0 [packages...]" -ALPINE_REPO="$(cat /etc/apk/cache.url)/v$1" +ALPINE_VERSION=$1 + +if [ "$ALPINE_VERSION" != "edge" ]; then + ALPINE_VERSION=v$1 +fi + +ALPINE_REPO="$(cat /etc/apk/cache.url)/$ALPINE_VERSION" CACHE="$2/$(apk --print-arch)" ROOTFS="$CACHE/../rootfs" shift 2