:: Re: [DNG] OT: how to trigger debcon…
Top Page
Delete this message
Reply to this message
Author: Florian Zieboll
Date:  
To: dng
Subject: Re: [DNG] OT: how to trigger debconf on package upgrade?
On Wed, 17 Feb 2016 15:41:18 +0100
zeanmi@??? wrote:

> Hi ! I don't know if that can be helpful :



Hallo Zeanmi,
thanks for your reply! I found that

> export APT_LISTCHANGES_FRONTEND=none


and

> apt-get -q -y -o Dpkg::Options::="--force-confdef" -o
> Dpkg::Options::="--force-confold" dist-upgrade


are not even necessary, as both are handled cleanly by apt-get's
"--assume-yes" option: dpkg defaults to "confold" and also
apt-listchanges works fine, at least when it is configured to use the
"readline" interface. I like having the changelog included with the
upgrade notification.

This is the relevant part of the script I use:

apt-get upgrade -y -q 2>&1 |\
    grep -ve "^(\{0,1\}Reading" \
         -e "^Building" |\
    tee -a /var/log/safe-upgrade.log |\
    grep -ve "^0 upgraded.*0 not upgraded\.$" |\
    mailx -E -s "$HOSTNAME"\ upgrade\ log root@localhost


I think I will set DEBIAN_FRONTEND=noninteractive before that and look
for a way to get notified when an configurable package has been
upgraded - or implement a check to get notified if apt-get doesn't exit
"0" in a given time. Further hints still welcome.


Florian