From fd9b911a42252064678c7ed1acaebab743afd75f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 12 Oct 2022 18:05:20 +0200 Subject: [PATCH] Dockerfile: apt-mark manual fdroidserver dependencies Then apt-get does not warn about unneeded deps that could be autoremoved. --- buildserver/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/buildserver/Dockerfile b/buildserver/Dockerfile index f974620e..647ef4a8 100644 --- a/buildserver/Dockerfile +++ b/buildserver/Dockerfile @@ -35,8 +35,8 @@ RUN useradd --create-home -s /bin/bash vagrant && echo -n 'vagrant:vagrant' | ch # Debian Docker images will soon default to HTTPS for apt sources, so force it. # https://github.com/debuerreotype/docker-debian-artifacts/issues/15 # -# Ensure fdroidserver is installed before purging unneeded packages, -# otherwise, all its dependencies get purged. +# Ensure fdroidserver's dependencies are marked manual before purging +# unneeded packages, otherwise, all its dependencies get purged. RUN printf "path-exclude=/usr/share/locale/*\npath-exclude=/usr/share/man/*\npath-exclude=/usr/share/doc/*\npath-include=/usr/share/doc/*/copyright\n" >/etc/dpkg/dpkg.cfg.d/01_nodoc \ && mkdir -p /usr/share/man/man1 \ && apt-get update \ @@ -57,9 +57,8 @@ RUN printf "path-exclude=/usr/share/locale/*\npath-exclude=/usr/share/man/*\npat && bash /opt/buildserver/provision-gradle \ && bash /opt/buildserver/provision-buildserverid $GIT_REV_PARSE_HEAD \ && rm -rf /vagrant/cache \ - && apt-get install fdroidserver \ + && apt-mark manual `apt-cache depends fdroidserver | sed -nE 's,^[| ]*Depends: ([a-z0-9 -]+),\1,p'` \ && apt-get autoremove --purge \ - && apt-get purge fdroidserver \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*