[sagemath] 01/01: Only check dochtml.log for errors if we will actually build the doc packages

Ximin Luo infinity0 at debian.org
Mon Jan 9 11:53:05 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 1d909770674860277f857344eaca1659863ddfd4
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Jan 9 12:52:35 2017 +0100

    Only check dochtml.log for errors if we will actually build the doc packages
---
 debian/clean |  1 +
 debian/rules | 27 ++++++++++++++++++++-------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/debian/clean b/debian/clean
index 05604d1..bd37efc 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,3 +1,4 @@
+dh_auto_build-stamp
 prune
 debian/pruner/config.log
 debian/pruner/config.status
diff --git a/debian/rules b/debian/rules
index 7e68f91..b259868 100755
--- a/debian/rules
+++ b/debian/rules
@@ -71,15 +71,34 @@ debian/sagemath-doc-%.doc-base: debian/sagemath-doc-LANG.doc-base.in debian/rule
 		sed -e "s/LANGUAGE/$$(debian/lang.py $*)/g" -e 's/LANG/$*/g' -e 's/SUBDIR/tutorial\//g' < "$<" > "$@"; \
 	fi
 
+prune: debian/control
+	cd debian/pruner && autoconf -I m4
+	cd debian/pruner && ./configure --with-sage-root="$(CURDIR)/sage"
+	cd sage && python ../debian/pruner/pruner.py || $(is_prerelease)
+	touch prune
+
 ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
 DEB_BUILD_TARGET = build
 else
 DEB_BUILD_TARGET = all
 endif
-override_dh_auto_build: prune
+dh_auto_build-stamp: prune
 	MAKE='make -j$(NUMJOBS)' make --directory=sage $(DEB_BUILD_TARGET)
+	touch dh_auto_build-stamp
+
+check-dochtml-log:
+	# Sometimes, parts of the docbuild fail with MemoryError or OSError but
+	# Sage doesn't detect this. Here we detect it and fail the build if so.
 	! grep Error sage/logs/dochtml.log
 
+# We build everything in both -arch and -indep because the tests need the docs.
+# TODO: as described in #849150, we can make this more efficient if we figure
+# out how to disable the tests that need the docs.
+override_dh_auto_build-arch: dh_auto_build-stamp
+# Only run check-dochtml-log if we will actually build the doc packages.
+# Otherwise we get spurious failures on some low-memory arch-any buildds.
+override_dh_auto_build-indep: dh_auto_build-stamp check-dochtml-log
+
 run_tests = cd sage && ./sage -t -p $(NUMJOBS) --all --long $(EXTRA_SAGE_TEST_FLAGS) --logfile=logs/ptestlong.log
 override_dh_auto_test:
 	cd sage && $(SAGE_LOCAL)/bin/sage-starts
@@ -177,12 +196,6 @@ override_dh_clean:
 	$(call preserve_docs,dh_clean,debian/tmp)
 	$(call preserve_docs,rm -rf debian/build/*,debian/build)
 
-prune: debian/control
-	cd debian/pruner && autoconf -I m4
-	cd debian/pruner && ./configure --with-sage-root="$(CURDIR)/sage"
-	cd sage && python ../debian/pruner/pruner.py || $(is_prerelease)
-	touch prune
-
 # If the docbuild fails and you want to try again, you should run this first.
 # Otherwise the docbuild gets slower and slower as it re-reads information from
 # its build directory. At least that's my (infinity0) impression; I didn't

-- 
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