Attached the patch as a file.
*** usr/bin/ucf~ 2020-06-16 07:37:53.000000000 +0200
--- usr/bin/ucf 2021-01-05 16:36:12.097133824 +0100
***************
*** 439,454 ****
fi
# Follow dpkg-divert as though we are installed as part of $opt_package
! divert_line=$(dpkg-divert --list "$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
if [ "$divert_package" != "$opt_package" ]; then
dest_file=$(dpkg-divert --truename "$dest_file")
--- 439,448 ----
fi
# Follow dpkg-divert as though we are installed as part of $opt_package
! divert_line=$(dpkg-divert --listpackage "$dest_file")
if [ -n "$divert_line" ]; then
! # 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")
*** usr/bin/ucfr~ 2020-06-16 07:37:53.000000000 +0200
--- usr/bin/ucfr 2021-01-05 16:39:06.592853096 +0100
***************
*** 112,121 ****
awk '{print $1;}' );
if [ "$pkg" != "$old_pkg" ]; then
! if [ "X$FORCE" = "X" ]; then
! echo >&2 "$progname: Attempt from package $pkg to take ${real_conf_file} away from package $old_pkg";
! echo >&2 "ucfr: Aborting.";
! exit 4;
fi
else
if [ "X$VERBOSE" != "X" ]; then
--- 112,129 ----
awk '{print $1;}' );
if [ "$pkg" != "$old_pkg" ]; then
! divert_package=$(dpkg-divert --listpackage "$conf_file")
! if [ -n "$divert_package" ]; then
! if [ "X$VERBOSE" != "X" ]; then
! echo >&2 "$progname: Package $pkg will not take away diverted ${conf_file} from package $divert_package";
! fi
! exit 0;
! else
! if [ "X$FORCE" = "X" ]; then
! echo >&2 "$progname: Attempt from package $pkg to take ${real_conf_file} away from package $old_pkg";
! echo >&2 "ucfr: Aborting.";
! exit 4;
! fi
fi
else
if [ "X$VERBOSE" != "X" ]; then