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

Bug#877267: ocaml-nox: broken symlink: /usr/share/doc/ocaml-nox/README.gz -> ../ocaml-base-nox/README.gz



Package: ocaml-source
Version: 4.05.0-10
Followup-For: Bug #877267
Control: tags 877267 + patch

Hello.

It seems that upstream has renamed README to README.adoc.
The file is installed, but the part of debian/rules
symlinking it from other packages has not been updated.

However:
* Debian policy now recommends to install most documentation in
  /usr/share/doc/$main so that it is easyer to find.
  This probably removes the need for cross-package symlinks.
* The --ignore debhelper option may become obsolete in next version.

The attached diff contains a suggested solution:
* gather information about OCaml in Debian in a single file.
* rename it because README.Debian is handled specially by debhelper.
* install it alongside README.adoc into the ocaml-base-nox package
* use "dh_installdocs --main-doc-package" to install it into
  the /usr/share/doc/ocaml directory as the policy recommends.
* remove any cross-package symbolic link.
diff --git a/debian/MANIFEST b/debian/MANIFEST
index 35f8619..7198450 100644
--- a/debian/MANIFEST
+++ b/debian/MANIFEST
@@ -1,5 +1,5 @@
 debian/MANIFEST
-debian/README.Debian
+debian/OCaml_for_Debian
 debian/README.source
 debian/TODO.Debian
 debian/changelog
@@ -15,7 +15,6 @@ debian/man/ocamldumpobj.1
 debian/man/ocamlmklib.1
 debian/man/ocamlobjinfo.1
 debian/native-archs
-debian/ocaml-base-nox.README.Debian
 debian/ocaml-base-nox.dirs.in
 debian/ocaml-base-nox.docs
 debian/ocaml-base-nox.install.in
diff --git a/debian/ocaml-base-nox.README.Debian b/debian/OCaml_for_Debian
similarity index 77%
rename from debian/ocaml-base-nox.README.Debian
rename to debian/OCaml_for_Debian
index cda8aaf..67213a3 100644
--- a/debian/ocaml-base-nox.README.Debian
+++ b/debian/OCaml_for_Debian
@@ -52,3 +52,19 @@ In order to be able to compile ocamldoc generated LaTeX sources you will need
 to install the "texlive-latex-extra" package.
 
  -- Stefano Zacchiroli <zack@debian.org>  Sun, 02 Sep 2007 18:22:14 +0200
+
+Debug information produced by ocamlc
+====================================
+
+In upstream OCaml, “ocamlc -custom” produces executables that cannot
+be stripped (more precisely, the bytecode, which is not part of the
+ELF data, is removed by strip). This Debian version is patched (and
+the patch has been rejected by upstream [1], but is available
+separately in debian/patches) so that the bytecode is embedded in the
+executable and can be stripped. This new behaviour is optional, and
+can be enabled by setting the OCAML_CUSTOM_EMBED environment variable
+to “y”.
+
+[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=49;bug=256900
+
+ -- Stéphane Glondu <glondu@debian.org>, Tue, 26 Jun 2012 07:27:05 +0200
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 7a63ebc..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,15 +0,0 @@
-OCaml Debian package
-====================
-
-In upstream OCaml, “ocamlc -custom” produces executables that cannot
-be stripped (more precisely, the bytecode, which is not part of the
-ELF data, is removed by strip). This Debian version is patched (and
-the patch has been rejected by upstream [1], but is available
-separately in debian/patches) so that the bytecode is embedded in the
-executable and can be stripped. This new behaviour is optional, and
-can be enabled by setting the OCAML_CUSTOM_EMBED environment variable
-to “y”.
-
-[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=49;bug=256900
-
- -- Stéphane Glondu <glondu@debian.org>, Tue, 26 Jun 2012 07:27:05 +0200
diff --git a/debian/ocaml-base-nox.docs b/debian/ocaml-base-nox.docs
index 52e2242..dd2b95c 100644
--- a/debian/ocaml-base-nox.docs
+++ b/debian/ocaml-base-nox.docs
@@ -1 +1,2 @@
+debian/OCaml_for_Debian
 README.adoc
diff --git a/debian/rules b/debian/rules
index 96fef65..0289564 100755
--- a/debian/rules
+++ b/debian/rules
@@ -236,12 +236,6 @@ endif
 	    cp tools/$$u debian/ocaml-nox/usr/bin/ocaml$$u; \
 	  fi \
 	done
-	set -e; for pkg in ocaml ocaml-nox ocaml-base; do ( \
-	  mkdir -p debian/$$pkg/usr/share/doc/$$pkg && \
-	  cd debian/$$pkg/usr/share/doc/$$pkg && \
-	  ln -sf ../ocaml-base-nox/README.gz . && \
-	  ln -sf ../ocaml-base-nox/README.Debian .; \
-	); done
 endif
 # Remaining stuff
 	touch $@
@@ -299,4 +293,5 @@ endif
 
 .PHONY: override_dh_installdocs
 override_dh_installdocs:
-	dh_installdocs --ignore debian/README.Debian
+	dh_installdocs --package=ocaml-base-nox --doc-main-package=ocaml
+	dh_installdocs --remaining-packages

Reply to: