summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2016-01-23 13:53:57 -0800
committerManoj Srivastava <srivasta@debian.org>2016-01-23 14:06:06 -0800
commit599bdf9413ecd06ea18ed02e58d8fcac0bda4bd3 (patch)
tree9d8f25fa8213cdbbc87f6bcf0079ee8b62c7a843
parente872632ff61f6ab2ca05588b136c6b979ebd2c0e (diff)
There is no new file when purgingdebian/3.0033
Bug fix: "ucf breaks installation of texlive-base (basename: missing operand)", thanks to Andreas Metzler. This has been a long standing bug, unmasked by the cleanup done last upload. When purging, there is no new file, just a destination file that needs to be removed. So, this commit makes no action on new-file when purging. (Closes: #812402). Signed-off-by: Manoj Srivastava <srivasta@debian.org>
-rw-r--r--debian/changelog10
-rwxr-xr-xucf25
2 files changed, 30 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index ce049c6..9928eb0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ucf (3.0033) unstable; urgency=low
+
+ * Bug fix: "ucf breaks installation of texlive-base (basename: missing
+ operand)", thanks to Andreas Metzler. This has been a long standing
+ bug, unmasked by the cleanup done last upload. When purging, there is
+ no new file, just a destination file that needs to be removed. So,
+ this commit makes no action on new-file when purging. (Closes: #812402).
+
+ -- Manoj Srivastava <srivasta@debian.org> Sat, 23 Jan 2016 13:52:29 -0800
+
ucf (3.0032) unstable; urgency=low
* Ran shellcheck on all the shell scripts, and fixed most of the issues
diff --git a/ucf b/ucf
index 766a715..775a660 100755
--- a/ucf
+++ b/ucf
@@ -354,7 +354,11 @@ if [ "X$PURGE" = "XYES" ]; then
exit 2 ;
fi
temp_dest_file="$1";
- setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file";
+ if [ -e "$temp_dest_file" ]; then
+ setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file";
+ else
+ setq dest_file "$temp_dest_file" "The Destination file";
+ fi
else
if [ $# != 2 ]; then
echo >&2 "*** ERROR: Need exactly two arguments, got $#";
@@ -370,7 +374,11 @@ else
exit 1;
fi
setq new_file "$(readlink -q -m $temp_new_file)" "The new file";
- setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file";
+ if [ -e "$temp_dest_file" ]; then
+ setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file";
+ else
+ setq dest_file "$temp_dest_file" "The Destination file";
+ fi
fi
@@ -399,7 +407,7 @@ else
if [ "X$new_file" != "X" ]; then
setq source_dir "$(dirname $new_file)" "The Source directory"
else
- setq source_dir /tmp "The Source directory"
+ setq source_dir "/tmp" "The Source directory"
fi
fi
@@ -468,8 +476,10 @@ elif [ ! "x$UCF_OLD_MDSUM_FILE" = "x" ]; then
setq old_mdsum_file "$UCF_OLD_MDSUM_FILE" "The md5sum is found here"
elif [ ! "x$conf_old_mdsum_file" = "x" ]; then
setq old_mdsum_file "$conf_old_mdsum_file" "Replace the old file"
-else
+elif [ ! "x${new_file}" = "x" ]; then
old_mdsum_file="$source_dir/$(basename ${new_file}).md5sum";
+else
+ old_mdsum_file="";
fi
@@ -513,7 +523,12 @@ if [ -e "$statedir/hashfile" ]; then
awk '{print $1;}' )
fi
-old_mdsum_dir="$source_dir/"$(basename "${new_file}")".md5sum.d";
+if [ ! "x${new_file}" = "x" ]; then
+ old_mdsum_dir="$source_dir/"$(basename "${new_file}")".md5sum.d";
+else
+ old_mdsum_dir="";
+fi
+
cached_file="$(echo $dest_file | tr / :)"
######################################################################
######## #########