travis: Don't ask any debconf questions when installing packages
authorDan Nicholson <dbn@endlessos.org>
Thu, 8 Apr 2021 16:22:21 +0000 (10:22 -0600)
committerDan Nicholson <dbn@endlessos.org>
Thu, 8 Apr 2021 16:25:46 +0000 (10:25 -0600)
Currently the Ubuntu builds are stuck waiting for an answer on what
timezone to use. That could be fixed, but generally the way to do these
types of installs is to set the DEBIAN_FRONTEND environment variable to
`noninteractive` so that debconf just chooses a default. This is what
debootstrap does, for instance. I tested installing tzdata on a local
focal container this way and it just chooses `Etc/UTC` as the timezone.

ci/travis-install.sh

index 648017412950045acc0c45c25f164a8a91e4dd32..b40f4c55d2e0f73d317cc68697b08de6610618fd 100755 (executable)
@@ -82,6 +82,10 @@ esac
 
 case "$ci_distro" in
     (debian|ubuntu)
+        # Make debconf run non-interactively since its questions can't
+        # be answered.
+        export DEBIAN_FRONTEND=noninteractive
+
         # TODO: fetch this list from the Debian packaging git repository?
         $sudo apt-get -y update
         $sudo apt-get -y install \