[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian packaging of tex-common) branch, master, updated. 4.01-2-gb5e170b



The following commit has been merged in the master branch:
commit b5e170b8c9224404750a6af2ea3294ed3ca17b4b
Author: Norbert Preining <preining@debian.org>
Date:   Fri Jan 11 08:29:03 2013 +0900

    dh_installtex: properly deal with already existing format links
    (error out if present and not agreeing)

diff --git a/debian/changelog b/debian/changelog
index 338f781..c4b6cb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tex-common (4.02) UNRELEASED; urgency=low
+
+  * dh_installtex: properly deal with already existing format links
+    (error out if present and not agreeing)
+
+ -- Norbert Preining <preining@debian.org>  Fri, 11 Jan 2013 08:27:42 +0900
+
 tex-common (4.01) experimental; urgency=low
 
   * dh_installtex: if the dir /usr/share/texmf/doc is found in the
diff --git a/scripts/dh_installtex b/scripts/dh_installtex
index 7a10d64..6352a25 100755
--- a/scripts/dh_installtex
+++ b/scripts/dh_installtex
@@ -638,8 +638,17 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 			push @fmtdata, "$format";
 			if ($doformatlinks && ($format ne $engine)) {
 				my $formatlink = "$tmp/usr/bin/$format";
-				if ( -e $formatlink ) {
-					warning("/usr/bin/$format already exists, skipping");
+				if ( -l $formatlink ) {
+					if (readlink($formatlink) eq $engine) {
+						# correct link generated, only give message
+						warning ("/usr/bin/$format link already correctly created, skipping recreation");
+					} else {
+						# it is a link but pointing to something different
+						# error out
+						error ("/usr/bin/$format link points to something different but $engine!");
+					}
+				} elsif ( -e $formatlink ) {
+					error ("/usr/bin/$format already exists and not a link, exiting");
 				} else {
 					doit("mkdir","-p","$tmp/usr/bin");
 					doit("ln","-s","$engine","$formatlink");

-- 
Debian packaging of tex-common)


Reply to: