Your message dated Fri, 8 Nov 2024 10:08:09 +0000
with message-id <[email protected]>
and subject line Closing: fixed in 3.0043+nmu1
has caused the Debian Bug report #1053676,
regarding Error is script: /usr/bin/ucf: 444: [: missing ]
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1053676: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053676
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ucf
Version: 3.0043

Today i realized this error while upgrading my Debian 11 system with the latest packages:

Setting up openssh-sftp-server (1:8.4p1-5+deb11u2) ...
Setting up openssh-server (1:8.4p1-5+deb11u2) ...
grep: ]: No such file or directory
/usr/bin/ucf: 444: [: missing ]

Creating config file /etc/ssh/sshd_config.distrib with new version
rescue-ssh.target is a disabled or a static unit, not starting it.

===================

# dpkg -l | grep ucf
ii  ucf 3.0043                               all          Update Configuration File(s): preserve user changes to config files

The issue looks like https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979354

Regards
Volker

Attachment: OpenPGP_0x01D5A46183265B8C.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Version: 3.0043+nmu1

This code was removed in 3.0043+nmu1. The relevant diff is attached.

Closing as fixed.

Mark



diff --git a/ucf b/ucf
index 7efdf1c..3e218bf 100755
--- a/ucf
+++ b/ucf
@@ -439,16 +439,10 @@ else
 fi
 
 # Follow dpkg-divert as though we are installed as part of $opt_package
-divert_line=$(dpkg-divert --list "$dest_file")
+divert_line=$(dpkg-divert --listpackage "$dest_file")
 if [ -n "$divert_line" ]; then
-   if [ echo "$divert_line" | grep "^local" ]; then
-       # local diversion; pick something not in the package namespace
-       divert_package="LOCAL"
-   else
-       # extract the name of the diverted package.
-       # The fact that this requires output parsing is bug #485012
-       divert_package=$(dpkg-divert --listpackage "$dest_file")
-   fi
+   # name of the package or 'LOCAL' for a local diversion
+   divert_package="$divert_line"
 
    if [ "$divert_package" != "$opt_package" ]; then
        dest_file=$(dpkg-divert --truename "$dest_file")

--- End Message ---

Reply via email to