From cf37196dca93a8785c5a4e0af6e9a5053bff4e3a Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 29 Sep 2015 11:52:30 +0200 Subject: CI: Don't depend on user input with apt-get Resolves: https://fedorahosted.org/sssd/ticket/2433 Reviewed-by: Nikolai Kondrashov --- contrib/ci/README.md | 5 +++++ contrib/ci/distro.sh | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/ci/README.md b/contrib/ci/README.md index 6b5f7f30e..50b73ec35 100644 --- a/contrib/ci/README.md +++ b/contrib/ci/README.md @@ -47,6 +47,11 @@ and Debian-based distros: Where `` is the user invoking CI. +You may also want to allow passing DEBIAN_FRONTEND environment variable to +apt-get on Debian, so CI can request non-interactive package installation: + + Defaults!/usr/bin/apt-get env_keep += "DEBIAN_FRONTEND" + On Red Hat distros a repository carrying dependencies missing from some distros needs to be added to yum configuration. See instructions on the [Copr project page](http://copr-fe.cloud.fedoraproject.org/coprs/lslebodn/sssd-deps/). diff --git a/contrib/ci/distro.sh b/contrib/ci/distro.sh index 5416bfff3..6a2aebca6 100644 --- a/contrib/ci/distro.sh +++ b/contrib/ci/distro.sh @@ -60,7 +60,8 @@ function distro_pkg_install() {print} END {exit s}' elif [[ "$DISTRO_BRANCH" == -debian-* ]]; then - [ $# != 0 ] && sudo -p "$prompt" apt-get --yes install -- "$@" + [ $# != 0 ] && DEBIAN_FRONTEND=noninteractive \ + sudo -p "$prompt" apt-get --yes install -- "$@" else echo "Cannot install packages on $DISTRO_BRANCH" >&2 exit 1 -- cgit