Bug#867511: ucf: Sometimes skips file dialog for files generated during dpkg-reconfigure

2019-08-22 Thread Laurent Bigonville

On Fri, 7 Jul 2017 00:36:38 +0200 Robert Luberda  wrote:
[...]
>
> 5. If he or she wants to correct the mistake, runs the dpkg-reonfigure
> command again, and selects exactly the same options, what makes
> dpkg-reconfigure to create exactly the same new config file as 
previously.

> Obviously the same ucf command will be called, but this time
> *ucf will happily exit without prompting the user* for anything - and 
this

> is the bug this report is about.
>

This is a quite annoying issue as some user might loose the changes they 
are trying to apply to a configuration file that is generated via debconf.


I see that when calling dpkg-reconfigure, the DEBCONF_RECONFIGURE=1 
environment variable is set.


Couldn't this be used to detect that situation?



Bug#867511: ucf: Sometimes skips file dialog for files generated during dpkg-reconfigure

2018-02-16 Thread Manoj Srivastava
Severity 867511 wishlist
thanks

Hi,

Yes. This would be the same if you install a new version, where
 the maintainer has not changed a conffile, and that the user had
 previously rejected, but now has changed her mind.

ucf has no way of knowing that the user might have changed their
 minds.  The user has the option to either manually make the changes, or
 look at the generated file and manually copy it over.

A deeper integration of ucf like functionality into
 dpkg/dpkg-reconfigure would be the ideal solution.

manoj
-- 
Marriage Ceremony: An incredible metaphysical sham of watching God and
the law being dragged into the affairs of your family.-- O. C. Ogilvie
Manoj Srivastava  
4096R/C5779A1C E37E 5EC5 2A01 DA25 AD20  05B6 CF48 9438 C577 9A1C


smime.p7s
Description: S/MIME cryptographic signature


Bug#867511: ucf: Sometimes skips file dialog for files generated during dpkg-reconfigure

2017-07-06 Thread Robert Luberda
Package: ucf
Version: 3.0036
Severity: important

Hi,

apt-listchanges uses debconf-based interface to generate a new version
of config file, and then calls ucf to update the config file with the
new version. I've just noticed that this does not work properly when
the generated file is the same as the file that was previously chosen by
a user to be kept unchanged.

To explain this behaviour in details let me use the following example 
steps the user can made:

1. Let's assume that the user changes something in listchanges.conf
   file manually, e.g.
  echo "someoption = value" >> /etc/apt/listchanges.conf

2. Then he or she  uses `dpkg-reconfigure apt-listchanges' command to
   change some apt-listchanges settings. For simplicity let's assume that the
   dpkg-reconfigure does something like:
 sed -e 's/value/VALUE/' < /etc/apt/listchanges.conf > 
/etc/apt/listchanges.conf.new

3. Now dpkg-reconfigure calls ucf:
 /usr/bin/ucf --debconf-ok /etc/apt/listchanges.conf.new 
/etc/apt/listchanges.conf
   Ucf shows a file modification prompt, and that's OK.

4. But now let's assume that the the user selects "keep the local version 
currently
   installed" for example by mistake, because this is the default option.

5. If he or she wants to correct the mistake, runs the dpkg-reonfigure
   command again, and selects exactly the same options, what makes 
   dpkg-reconfigure to create exactly the same new config file as previously. 
   Obviously the same ucf command will be called, but this time 
   *ucf will happily exit without prompting the user* for anything - and this 
   is the bug this report is about.

Regards,
robert


-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (990, 'unstable-debug'), (990, 'unstable'), (990, 'testing'), 
(990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.11.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8), 
LANGUAGE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages ucf depends on:
ii  coreutils  8.26-3
ii  debconf1.5.62

ucf recommends no packages.

ucf suggests no packages.

-- debconf information:
  ucf/title:
* ucf/show_diff:
* ucf/changeprompt_threeway: keep_current
  ucf/conflicts_found:
  ucf/changeprompt: keep_current