Package: ucf
Version: 3.0036
Severity: normal
Hi,
while trying to understand ucf, I did the following.
[95/5352]mh@swivel:~/tmp/nosnap/ucf/test $ echo "package file" > packagefile
[96/5353]mh@swivel:~/tmp/nosnap/ucf/test $ sudo ucf $(pwd)/packagefile
$(pwd)/localfile
Creating config file /home/mh/tmp/nosnap/ucf/test/localfile with new version
[97/5354]mh@swivel:~/tmp/nosnap/ucf/test $ sudo ucfr mytest $(pwd)/localfile
[98/5355]mh@swivel:~/tmp/nosnap/ucf/test $ echo "changed package file" >
packagefile
[99/5356]mh@swivel:~/tmp/nosnap/ucf/test $ echo "changed local file" > localfile
[101/5358]mh@swivel:~/tmp/nosnap/ucf/test $ sudo ucf $(pwd)/packagefile
$(pwd)/localfile
This displays the following dialog:
┌───────────────────────────────────┤ Modified configuration file
├───────────────────────────────────┐
│ A new version (/home/mh/tmp/nosnap/ucf/test/packagefile) of configuration
file │
│ /home/mh/tmp/nosnap/ucf/test/localfile is available, but the version
installed currently has been │
│ locally modified.
│
│
│
│ What do you want to do about modified configuration file localfile?
│
│
│
│ install the package maintainer's version
│
│ keep the local version currently installed
│
│ show the differences between the versions
│
│ show a side-by-side difference between the versions
│
│ show a 3-way difference between available versions
│
│ do a 3-way merge between available versions
(experimental) │
│ start a new shell to examine the situation
│
│
│
│
│
│ <Ok>
│
│
│
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
Please note the two 3-way merge options, that should only be displayed
if ucf --three-way was called. Indeed, when repeating the same
procedure with the last ucf call being augmented with the --three-way
option, the same dialog comes up.
I have observed in another test case that the short version of the
dialog, sans the 3-way merge options, was displayed even if ucf was
called with --three-way.
The code does not show any obvious signs of reversed logic. Please
explain or fix the issue.
Greetings
Marc
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.13.8-zgws1 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en
(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.28-1
ii debconf 1.5.63
ucf recommends no packages.
ucf suggests no packages.
-- debconf information excluded