diff --git a/templates/etc/cron.daily/pbuilder-update.erb b/templates/etc/cron.daily/pbuilder-update.erb index 1df7e9b679d087a8ae222da4796bb09eb754e791..b1718fcc10777afc8a9809a168077fc766f63901 100755 --- a/templates/etc/cron.daily/pbuilder-update.erb +++ b/templates/etc/cron.daily/pbuilder-update.erb @@ -32,13 +32,24 @@ ignore="$ignore"'|W:.No local .etc.mailname to copy' # For more information, see # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869425 +# The original base.tgz (.cow directory) created using "cowbuilder +# --create" does not contain the Stanford-specific apt source files that +# we add later via Puppet. Because of this, when we do a "cowbuilder +# update" on the .cow directory we see this error: +# +# --override-config is not set; not updating apt.conf Read the manpage for details. +# +# This is telling us that the apt configuration has been changed relative +# to the original tar.gz image. To get around this we add +# --override-config option to the cowbuilder update command. + basedir=/var/cache/pbuilder for dist in <%= dists_to_update %> ; do if [ ! -d $basedir/base-$dist.cow ] ; then continue fi chroot $basedir/base-$dist.cow apt-get update > /dev/null - (cowbuilder --update --basepath $basedir/base-$dist.cow \ + (cowbuilder --update --override-config --basepath $basedir/base-$dist.cow \ --distribution $dist --configfile /etc/pbuilder/$dist \ 2>&1 > /dev/null) | egrep -v "$ignore" done