[sagemath] 05/05: Add lintian warnings for the deduplication hardlinks

Ximin Luo infinity0 at debian.org
Fri Aug 18 16:55:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagemath.

commit c6057353a101b8496dc631bfdd725b73d3c7eff6
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Aug 18 18:52:46 2017 +0200

    Add lintian warnings for the deduplication hardlinks
---
 debian/.gitignore                                            |  1 +
 debian/rules                                                 | 12 ++++++++++--
 debian/sagemath-doc-LANG.lintian-overrides.in                |  2 ++
 ...intian-overrides => sagemath-doc-en.lintian-overrides.in} |  0
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/debian/.gitignore b/debian/.gitignore
index c59da97..ba948e5 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -6,5 +6,6 @@
 /sagemath-doc-*.install
 /sagemath-doc-*.control
 /sagemath-doc-*.doc-base
+/sagemath-doc-*.lintian-overrides
 /control
 !/*.in
diff --git a/debian/rules b/debian/rules
index b8a21d1..037df80 100755
--- a/debian/rules
+++ b/debian/rules
@@ -35,6 +35,7 @@ LANGS = $(shell cd sage/src/doc && find . -mindepth 1 -maxdepth 1 -type d | grep
 DOCS_INSTALL = $(LANGS:%=debian/sagemath-doc-%.install)
 DOCS_CONTROL = $(LANGS:%=debian/sagemath-doc-%.control)
 DOCS_DOC_BASE = $(LANGS:%=debian/sagemath-doc-%.doc-base)
+DOCS_OVERRIDES = $(LANGS:%=debian/sagemath-doc-%.lintian-overrides)
 DOCS_INSTALL_DIRS = $(LANGS:%=debian/sagemath-doc-%)
 
 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -82,6 +83,13 @@ debian/sagemath-doc-%.doc-base: debian/sagemath-doc-LANG.doc-base.in $(REBUILD_R
 		sed -e "s/LANGUAGE/$$(debian/lang.py $*)/g" -e 's/LANG/$*/g' -e 's/SUBDIR/tutorial\//g' < "$<" > "$@"; \
 	fi
 
+debian/sagemath-doc-%.lintian-overrides: debian/sagemath-doc-LANG.lintian-overrides.in \
+  $(wildcard debian/sagemath-doc-%.lintian-overrides.in) $(REBUILD_RULES)
+	sed -e "s/LANGUAGE/$$(debian/lang.py $*)/g" -e 's/LANG/$*/g' < "$<" > "$@"
+	if [ -f "debian/sagemath-doc-$*.lintian-overrides.in" ]; then \
+		sed -e "s/LANGUAGE/$$(debian/lang.py $*)/g" -e 's/LANG/$*/g' < "debian/sagemath-doc-$*.lintian-overrides.in" >> "$@"; \
+	fi
+
 prune: debian/control
 	cd debian/pruner && autoconf -I m4
 	cd debian/pruner && ./configure --with-sage-root="$(CURDIR)/sage"
@@ -180,7 +188,7 @@ else
 	dh_auto_clean -Dsage -- maintainer-clean
 endif
 
-override_dh_install-indep: $(DOCS_INSTALL) $(DOCS_DOC_BASE)
+override_dh_install-indep: $(DOCS_INSTALL) $(DOCS_DOC_BASE) $(DOCS_OVERRIDES)
 	dh_install --package sagemath-common -X.so
 	dh_install --remaining-packages --list-missing
 # Basic version of deduplicating the docs, for a much smaller install size.
@@ -228,7 +236,7 @@ else
 preserve_docs = $(1)
 endif
 override_dh_clean:
-	rm -f $(DOCS_INSTALL) $(DOCS_DOC_BASE)
+	rm -f $(DOCS_INSTALL) $(DOCS_DOC_BASE) $(DOCS_OVERRIDES)
 	rm -rf $(DOT_SAGE)
 	$(call preserve_docs,dh_clean,debian/tmp)
 	$(call preserve_docs,rm -rf debian/build/*,debian/build)
diff --git a/debian/sagemath-doc-LANG.lintian-overrides.in b/debian/sagemath-doc-LANG.lintian-overrides.in
new file mode 100644
index 0000000..e6b7627
--- /dev/null
+++ b/debian/sagemath-doc-LANG.lintian-overrides.in
@@ -0,0 +1,2 @@
+# Lintian's warning is only about cross-device links, I was advised to override it by another DD
+sagemath-doc-LANG binary: package-contains-hardlink usr/share/doc/sagemath/html/LANG/*
diff --git a/debian/sagemath-doc-en.lintian-overrides b/debian/sagemath-doc-en.lintian-overrides.in
similarity index 100%
rename from debian/sagemath-doc-en.lintian-overrides
rename to debian/sagemath-doc-en.lintian-overrides.in

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git



More information about the debian-science-commits mailing list