From 7eed5476d6153d05e5a0245ccfe28d893b0b369e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 20 Jun 2017 10:00:55 -0700 Subject: [PATCH] Adjust "erlang-base-hipe" installation to only happen if the package is available This also updates "generate-stackbrew-library.sh" to exclude "ppc64le" from the Debian variant given that upstream's repository doesn't have an "Architectures" entry (and supporting files) for it yet. --- 3.6/debian/Dockerfile | 17 +++++++++++++---- generate-stackbrew-library.sh | 5 +++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/3.6/debian/Dockerfile b/3.6/debian/Dockerfile index a4ceffc8..687ae86c 100644 --- a/3.6/debian/Dockerfile +++ b/3.6/debian/Dockerfile @@ -26,10 +26,18 @@ RUN set -x \ && apt-get purge -y --auto-remove ca-certificates wget # install Erlang -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +RUN set -ex; \ + apt-get update; \ +# "erlang-base-hipe" is optional (and only supported on a few arches) +# so, only install it if it's available for our current arch + if apt-cache show erlang-base-hipe 2>/dev/null | grep -q 'Package: erlang-base-hipe'; then \ + apt-get install -y --no-install-recommends \ + erlang-base-hipe \ + ; \ + fi; \ +# we start with "erlang-base-hipe" because it and "erlang-base" (non-hipe) are exclusive + apt-get install -y --no-install-recommends \ erlang-asn1 \ - erlang-base-hipe \ erlang-crypto \ erlang-eldap \ erlang-inets \ @@ -39,7 +47,8 @@ RUN apt-get update \ erlang-public-key \ erlang-ssl \ erlang-xmerl \ - && rm -rf /var/lib/apt/lists/* + ; \ + rm -rf /var/lib/apt/lists/* # get logs to stdout (thanks @dumbbell for pushing this upstream! :D) ENV RABBITMQ_LOGS=- RABBITMQ_SASL_LOGS=- diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c342c620..70c1fa3c 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -94,6 +94,11 @@ for version in "${versions[@]}"; do variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")" variantArches="${parentRepoToArches[$variantParent]}" + if [ "$variant" = 'debian' ]; then + # no ppc64le for now: https://www.rabbitmq.com/debian/dists/testing/Release (no "ppc64el" in "Architectures") + variantArches="$(echo " $variantArches " | sed -r -e 's/ ppc64le / /g')" + fi + echo cat <<-EOE Tags: $(join ', ' "${variantAliases[@]}")