diff options
author | Manoj Srivastava <srivasta@debian.org> | 2020-06-15 22:36:19 -0700 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2020-06-15 22:36:19 -0700 |
commit | cc3ffdb93ade210154537db2dd198a3513c5b477 (patch) | |
tree | 38ccf7c4acea3a2d4cce8fc8a9bcda13fa0e084d /ucf | |
parent | 06898965a118773d86ed2ef80304c0ce08fd83f8 (diff) | |
parent | 4735c23d34e7e6d2239a39db4df546b3705f7c5d (diff) |
Merge branch 'upstream'
* upstream:
fix(bug) Handle diverted files correctly
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
Diffstat (limited to 'ucf')
-rwxr-xr-x | ucf | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -438,9 +438,8 @@ else fi fi -safe_dest_file=$(echo "$dest_file" | perl -nle 'print "\Q$_\E\n"') # Follow dpkg-divert as though we are installed as part of $opt_package -divert_line=$(dpkg-divert --list "$safe_dest_file") +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 @@ -448,13 +447,15 @@ if [ -n "$divert_line" ]; then else # extract the name of the diverted package. # The fact that this requires output parsing is bug #485012 - divert_package=$(dpkg-divert --listpackage "$safe_dest_file") + divert_package=$(dpkg-divert --listpackage "$dest_file") fi if [ "$divert_package" != "$opt_package" ]; then - safe_dest_file=$(dpkg-divert --truename "safe_dest_file") + dest_file=$(dpkg-divert --truename "$dest_file") fi fi +safe_dest_file=$(echo "$dest_file" | perl -nle 'print "\Q$_\E\n"') + ###################################################################### ######## ######### |