Bug#597940: wrong debconf usage, not respecting users choice
Am 24.09.2010 13:38, schrieb Daniel Baumann: Package: apt-dater-host Severity: serious apt-dater-host uses debconf wrongly, you should use Choices-C instead of 'translating' booleans into 0 and 1. currently, it's not remembering the users choice and *always* enabling automated updates after a reconfigure or update, which is a serious bug. ---snip--- r...@bob:~# dpkg-reconfigure -plow -freadline apt-dater-host Configuring apt-dater-host -- If you disable this option, you have to acknowledge every upgrade process for all hosts. The pro of it would be, that you will be aware of every action apt wants to do. The con is, that you have to attach every host on multiple upgrades and acknowledge every single host. Enable automatic upgrades? no r...@bob:~# debconf-get-selections | grep apt-dater apt-dater-host apt-dater-host/assume_yes boolean false r...@bob:~# dpkg-reconfigure -pcritical -freadline apt-dater-host r...@bob:~# debconf-get-selections | grep apt-dater apt-dater-host apt-dater-host/assume_yes boolean 1 r...@bob:~# ---snap--- Oh yeah IC, buggy.. I just wanted to remove this question again and I think this may be a good time to do it. :) -- /* Mit freundlichem Gruß / With kind regards, Patrick Matthäi GNU/Linux Debian Developer E-Mail: pmatth...@debian.org patr...@linux-dev.org Comment: Always if we think we are right, we were maybe wrong. */ signature.asc Description: OpenPGP digital signature
Bug#597940: wrong debconf usage, not respecting users choice
tag 597940 patch thanks On 09/25/2010 09:52 AM, Patrick Matthäi wrote: I just wanted to remove this question again and I think this may be a good time to do it. :) no; just fix your broken postinst. trivial patch attached. -- Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist Email: daniel.baum...@panthera-systems.net Internet: http://people.panthera-systems.net/~daniel-baumann/ diff -Naurp apt-dater.orig/debian/apt-dater-host.postinst apt-dater/debian/apt-dater-host.postinst --- apt-dater.orig/debian/apt-dater-host.postinst 2010-07-05 18:45:14.0 + +++ apt-dater/debian/apt-dater-host.postinst 2010-09-25 08:00:51.861828186 + @@ -8,11 +8,15 @@ set -e do_hostconfig() { db_get apt-dater-host/assume_yes - ASSUME_YES=0 + case ${RET} in + true) + ASSUME_YES=1 + ;; - if [ $RET = true ] ; then - ASSUME_YES=1 - fi + false) + ASSUME_YES=0 + ;; + esac sed s/^\$ASSUME_YES=.*/\$ASSUME_YES=${ASSUME_YES}/ -i /etc/apt-dater-host.conf } diff -Naurp apt-dater.orig/debian/changelog apt-dater/debian/changelog --- apt-dater.orig/debian/changelog 2010-07-05 18:45:13.0 + +++ apt-dater/debian/changelog 2010-09-25 07:58:22.402831102 + @@ -1,3 +1,10 @@ +apt-dater (0.8.4-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Using debconf correctly to respect user choices (Closes: #597940). + + -- Daniel Baumann pmatth...@debian.org Sat, 25 Sep 2010 07:57:51 + + apt-dater (0.8.4-1) unstable; urgency=low * New upstream release.
Bug#597940: wrong debconf usage, not respecting users choice
Am 25.09.2010 10:02, schrieb Daniel Baumann: sed s/^\$ASSUME_YES=.*/\$ASSUME_YES=${ASSUME_YES}/ -i /etc/apt-dater-host.conf and this has to become: sed s/^\$ASSUMEYES=.*/\$ASSUMEYES=${ASSUME_YES}/ -i /etc/apt-dater-host.conf then it works -- /* Mit freundlichem Gruß / With kind regards, Patrick Matthäi GNU/Linux Debian Developer E-Mail: pmatth...@debian.org patr...@linux-dev.org Comment: Always if we think we are right, we were maybe wrong. */ signature.asc Description: OpenPGP digital signature
Bug#597940: wrong debconf usage, not respecting users choice
Package: apt-dater-host Severity: serious apt-dater-host uses debconf wrongly, you should use Choices-C instead of 'translating' booleans into 0 and 1. currently, it's not remembering the users choice and *always* enabling automated updates after a reconfigure or update, which is a serious bug. ---snip--- r...@bob:~# dpkg-reconfigure -plow -freadline apt-dater-host Configuring apt-dater-host -- If you disable this option, you have to acknowledge every upgrade process for all hosts. The pro of it would be, that you will be aware of every action apt wants to do. The con is, that you have to attach every host on multiple upgrades and acknowledge every single host. Enable automatic upgrades? no r...@bob:~# debconf-get-selections | grep apt-dater apt-dater-host apt-dater-host/assume_yes boolean false r...@bob:~# dpkg-reconfigure -pcritical -freadline apt-dater-host r...@bob:~# debconf-get-selections | grep apt-dater apt-dater-host apt-dater-host/assume_yes boolean 1 r...@bob:~# ---snap--- -- Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist Email: daniel.baum...@panthera-systems.net Internet: http://people.panthera-systems.net/~daniel-baumann/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org