true first_warning
true check_upgrade
true remove_bloat
-true disable_apt_listchanges
+true apt_listchanges disable
true comment_force_overwrite # ruzna opcija za dpkg
# ovo bi trebao biti zadnji post_upgrade - spremi popis
# instaliranih servisa za koje cemo na kraju provjeriti da li rade.
true debconf_priority reset
true add_group_proc # za oidentd
pkg kernel-2.6-cn dpkg-reconfigure kernel-2.6-cn
+true apt_listchanges enable
# ovo bi trebalo biti predzadnje na popisu
# - izvrsi sve uvjetne post_upgrade akcije
true run_post_upgrade
fi
}
-# temporary remove listchanges packages to reduce clutter during upgrade
-disable_apt_listchanges () {
- for p in apt-listchanges apt-listchanges-cn; do
- if pkg $p; then
- pkgrm $p
- post_upgrade pkgadd $p
- fi
+# temporary disable listchanges packages to reduce clutter during upgrade
+apt_listchanges () {
+ local file command=$1
+
+ for file in /etc/apt/apt.conf.d/20listchanges \
+ /etc/apt/apt.conf.d/20listchanges-cn
+ do
+ case $command in
+ disable)
+ if [ -f $file ]; then
+ dpkg-divert --local --rename --divert $file.$backup_ext \
+ --add $file || true
+ fi
+ ;;
+
+ enable)
+ if [ -f $file.$backup_ext ]; then
+ dpkg-divert --remove $file || true
+ fi
+ ;;
+ esac
done
}