Bug 1433033 - Set apt defaults to avoid passing -q, -y and --no-install-recommends to it. r?dustin draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 25 Jan 2018 22:09:56 +0900
changeset 747486 5e5c2745ea4353ccfd4cc58c5d998655fa563cdd
parent 747485 e05fd8f04dd53ce5d713d0b8836e04327b10d47e
child 747487 bc4db259b31a2df58ba24dcd5b7d0f00f2b70588
push id96908
push userbmo:mh+mozilla@glandium.org
push dateFri, 26 Jan 2018 02:31:20 +0000
reviewersdustin
bugs1433033
milestone60.0a1
Bug 1433033 - Set apt defaults to avoid passing -q, -y and --no-install-recommends to it. r?dustin
taskcluster/docker/android-build/Dockerfile
taskcluster/docker/debian7-build/Dockerfile
taskcluster/docker/toolchain-build/Dockerfile
--- a/taskcluster/docker/android-build/Dockerfile
+++ b/taskcluster/docker/android-build/Dockerfile
@@ -27,23 +27,27 @@ ENV HOME=/builds/worker \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging.
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 COPY sources.list /etc/apt/
 
-RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
+RUN ( echo 'quiet "true";'; \
+      echo 'APT::Get::Assume-Yes "true";'; \
+      echo 'APT::Install-Recommends "false";'; \
+      echo 'Acquire::Check-Valid-Until "false";'; \
+    ) > /etc/apt/apt.conf.d/99taskcluster
 
 # rsync is required for l10n single locale repacks.  less, screen, and
 # vim, help debugging interactive tasks in Task Cluster.
 # git and openssh-client are used to upload GeckoView javadoc to Github.
-RUN apt-get update -q && \
-    apt-get install -yyq --no-install-recommends \
+RUN apt-get update && \
+    apt-get install \
       autoconf2.13 \
       build-essential \
       base-files \
       ca-certificates \
       ccache \
       cmake \
       curl \
       file \
@@ -120,17 +124,17 @@ COPY topsrcdir/taskcluster/docker/deskto
 # Reset user/workdir from parent image so we can install software.
 WORKDIR /
 USER root
 
 # Install Sonatype Nexus.  Cribbed directly from
 # https://github.com/sonatype/docker-nexus/blob/fffd2c61b2368292040910c055cf690c8e76a272/oss/Dockerfile.
 
 # Observe missing --no-install-recommends, in order to install glib2.0/gconf/etc.
-RUN apt-get install -yyq \
+RUN apt-get install \
       libgconf2-4 \
       libgnome2-0 \
       openjdk-8-jdk-headless \
     && \
     apt-get clean
 
 ENV NEXUS_VERSION=2.12.0-01 \
     NEXUS_SHA1SUM=1a9aaad8414baffe0a2fd46eed1f41b85f4049e6 \
--- a/taskcluster/docker/debian7-build/Dockerfile
+++ b/taskcluster/docker/debian7-build/Dockerfile
@@ -27,36 +27,40 @@ ENV HOME=/builds/worker \
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian_wheezy-backports debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \
     done > /etc/apt/sources.list && \
-    echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
+    ( echo 'quiet "true";'; \
+      echo 'APT::Get::Assume-Yes "true";'; \
+      echo 'APT::Install-Recommends "false";'; \
+      echo 'Acquire::Check-Valid-Until "false";'; \
+    ) > /etc/apt/apt.conf.d/99taskcluster
 
-RUN apt-get update -q && \
-    apt-get install -yyq --no-install-recommends \
+RUN apt-get update && \
+    apt-get install \
       apt-transport-https \
       ca-certificates
 
 # %ARG DOCKER_IMAGE_PACKAGES
 RUN for task in $DOCKER_IMAGE_PACKAGES; do \
       echo "deb [trusted=yes] https://queue.taskcluster.net/v1/task/$task/runs/0/artifacts/public/build/ debian/" >> /etc/apt/sources.list; \
     done
 
 # %ARG ARCH
 RUN dpkg --add-architecture $ARCH
 
 # Ideally, we wouldn't need gcc-multilib and the extra linux-libc-dev,
 # but the latter is required to make the former installable, and the former
 # because of bug 1409276.
-RUN apt-get update -q && \
-    apt-get install -yyq --no-install-recommends \
+RUN apt-get update && \
+    apt-get install \
       autoconf2.13 \
       automake \
       bzip2 \
       curl \
       file \
       gawk \
       gcc-multilib \
       git \
--- a/taskcluster/docker/toolchain-build/Dockerfile
+++ b/taskcluster/docker/toolchain-build/Dockerfile
@@ -27,30 +27,34 @@ ENV HOME=/builds/worker \
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \
     done > /etc/apt/sources.list && \
-    echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
+    ( echo 'quiet "true";'; \
+      echo 'APT::Get::Assume-Yes "true";'; \
+      echo 'APT::Install-Recommends "false";'; \
+      echo 'Acquire::Check-Valid-Until "false";'; \
+    ) > /etc/apt/apt.conf.d/99taskcluster
 
-RUN apt-get update -q && \
-    apt-get install -yyq --no-install-recommends \
+RUN apt-get update && \
+    apt-get install \
       apt-transport-https \
       ca-certificates
 
 # %ARG DOCKER_IMAGE_PACKAGES
 RUN for task in $DOCKER_IMAGE_PACKAGES; do \
       echo "deb [trusted=yes] https://queue.taskcluster.net/v1/task/$task/runs/0/artifacts/public/build/ debian/" >> /etc/apt/sources.list; \
     done
 
-RUN apt-get update -q && \
-    apt-get install -yyq --no-install-recommends \
+RUN apt-get update && \
+    apt-get install \
       autoconf \
       automake \
       bison \
       build-essential \
       curl \
       cmake \
       flex \
       gawk \