3 # mk-basefile doesn't use the -updates suite, then we unpack it, then we
4 # install sources.list that has -updates and we install random
5 # packages. It might avoid a problem if we a dist-upgrade first.
7 $ROOTCMD apt-get update
8 $ROOTCMD apt-get
-y dist-upgrade
--purge --auto-remove
10 # https://lists.uni-koeln.de/pipermail/linux-fai/2016-July/011398.html
11 # In Ubuntu 16.04 (but not 14.04), the locales configuration mechanism has
12 # changed. There is a /var/lib/dpkg/info/locales.config file, which
13 # overrides /var/lib/dpkg/info/locales.postinst and consults
14 # /var/lib/locales/supported.d/local instead of the debconf system. (See
15 # the code in /usr/share/debconf/frontend that prefers locales.config.) This
16 # hook applies the debconf setting. It must run after FAI's debconf task
17 # but before dpkg gets a chance to clobber debconf with an empty setting.
20 if [ ! -f "$target/var/lib/locales/supported.d/local" ]; then
21 $ROOTCMD debconf
--owner=locales sh
-c '
22 . /usr/share/debconf/confmodule
24 db_get locales/locales_to_be_generated &&
25 mkdir -p /var/lib/locales/supported.d &&
26 echo "$RET" > /var/lib/locales/supported.d/local' &&
27 $ROOTCMD dpkg-reconfigure locales