Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

deb: use non-interactive, and no-install-recommends - #149

Merged
thaJeztah merged 2 commits into
docker:masterfrom
thaJeztah:no_install_recommends
Mar 24, 2020
Merged

deb: use non-interactive, and no-install-recommends#149
thaJeztah merged 2 commits into
docker:masterfrom
thaJeztah:no_install_recommends

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

The devscripts package on newer Ubuntu/Debian versions adds a HUGE
amount of new dependencies. Unfortunately we need this package as
it's the only package that provides mk-build-deps, but we don't
have to install all recommended packages:

On Ubuntu 20.04, without --no-install-recommends:

4 upgraded, 334 newly installed, 0 to remove and 4 not upgraded.
Need to get 100 MB of archives.
After this operation, 445 MB of additional disk space will be used.

And with --no-install-recommends;

0 upgraded, 104 newly installed, 0 to remove and 8 not upgraded.
Need to get 25.0 MB of archives.
After this operation, 119 MB of additional disk space will be used.

This patch also sets DEBIAN_FRONTEND=noninteractive, to prevent build
hanging if a package (such as tzdata) waits for user input otherwise.

The second commit updates handling of apt package cache; This patch removes the apt-cache after installing packages, and refreshes (apt-get update) before installing dependencies using mk-build-deps to prevent using a possibly stale index when dependencies in the control file change.

The devscripts package on newer Ubuntu/Debian versions adds a HUGE
amount of new dependencies. Unfortunately we need this package as
it's the only package that provides `mk-build-deps`, but we don't
have to install all recommended packages:
On Ubuntu 20.04, without `--no-install-recommends`:
4 upgraded, 334 newly installed, 0 to remove and 4 not upgraded.
Need to get 100 MB of archives.
After this operation, 445 MB of additional disk space will be used.
And with `--no-install-recommends`;
0 upgraded, 104 newly installed, 0 to remove and 8 not upgraded.
Need to get 25.0 MB of archives.
After this operation, 119 MB of additional disk space will be used.
This patch also sets `DEBIAN_FRONTEND=noninteractive`, to prevent build
hanging if a package (such as `tzdata`) waits for user input otherwise.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This patch removes the apt-cache after installing packages, and
refreshes (`apt-get update`) before installing dependencies using
`mk-build-deps` to prevent using a possibly stale index when
dependencies in the control file change.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

@silvin-lubeckisilvin-lubecki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

bringing this one in 👍

@thaJeztah
thaJeztah merged commit e95d845 into docker:masterMar 24, 2020
@thaJeztah
thaJeztah deleted the no_install_recommends branch March 24, 2020 13:28
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@thaJeztah@silvin-lubecki