Cleanup comments and remove unnecessary conditional

Also, switch to using `set -eux` + `;` chains consistently (no more `&&`).
This commit is contained in:
Tianon Gravi 2024-01-08 17:08:11 -08:00
parent c6324a9e93
commit d0ecd4b731
22 changed files with 77 additions and 143 deletions

View File

@ -1,7 +1,8 @@
FROM buildpack-deps:{{ env.codename }}-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
{{
if [
"focal", "groovy"
@ -14,5 +15,7 @@ if [
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,6 +6,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -43,15 +44,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

11
debian/bookworm/Dockerfile generated vendored
View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

9
debian/bookworm/scm/Dockerfile generated vendored
View File

@ -6,12 +6,15 @@
FROM buildpack-deps:bookworm-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

11
debian/bullseye/Dockerfile generated vendored
View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

9
debian/bullseye/scm/Dockerfile generated vendored
View File

@ -6,12 +6,15 @@
FROM buildpack-deps:bullseye-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

11
debian/buster/Dockerfile generated vendored
View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

9
debian/buster/scm/Dockerfile generated vendored
View File

@ -6,12 +6,15 @@
FROM buildpack-deps:buster-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

11
debian/sid/Dockerfile generated vendored
View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

9
debian/sid/scm/Dockerfile generated vendored
View File

@ -6,12 +6,15 @@
FROM buildpack-deps:sid-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

11
debian/trixie/Dockerfile generated vendored
View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

9
debian/trixie/scm/Dockerfile generated vendored
View File

@ -6,12 +6,15 @@
FROM buildpack-deps:trixie-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,13 +6,16 @@
FROM buildpack-deps:focal-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
bzr \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,12 +6,15 @@
FROM buildpack-deps:jammy-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,12 +6,15 @@
FROM buildpack-deps:lunar-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,12 +6,15 @@
FROM buildpack-deps:mantic-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*

View File

@ -12,6 +12,7 @@ RUN set -ex; \
autoconf \
automake \
bzip2 \
default-libmysqlclient-dev \
dpkg-dev \
file \
g++ \
@ -49,15 +50,5 @@ RUN set -ex; \
unzip \
xz-utils \
zlib1g-dev \
\
# https://lists.debian.org/debian-devel-announce/2016/09/msg00000.html
$( \
# if we use just "apt-cache show" here, it returns zero because "Can't select versions from package 'libmysqlclient-dev' as it is purely virtual", hence the pipe to grep
if apt-cache show 'default-libmysqlclient-dev' 2>/dev/null | grep -q '^Version:'; then \
echo 'default-libmysqlclient-dev'; \
else \
echo 'libmysqlclient-dev'; \
fi \
) \
; \
rm -rf /var/lib/apt/lists/*

View File

@ -6,12 +6,15 @@
FROM buildpack-deps:noble-curl
# procps is very common in build systems, and is a reasonably small package
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
git \
mercurial \
openssh-client \
subversion \
\
# procps is very common in build systems, and is a reasonably small package
procps \
&& rm -rf /var/lib/apt/lists/*
; \
rm -rf /var/lib/apt/lists/*