On Sat, 23 Nov 2019 04:18:43 +0100 Andreas Beckmann <a...@debian.org> wrote:
> Package: libpetsc3.11-dev-examples
> Version: 3.11.4+dfsg1-3
> Severity: serious
> User: debian...@lists.debian.org
> Usertags: piuparts
>
> Hi,
>
> a test with piuparts revealed that your package uses files from
> /usr/share/doc in its maintainer scripts which is a violation of
> Policy 12.3: "Packages must not require the existence of any files in
> /usr/share/doc/ in order to function."
>
https://www.debian.org/doc/debian-policy/ch-docs.html#additional-documentation
>
> These files must be moved to /usr/share/$PACKAGE and may be symlinked
> from /usr/share/doc/$PACKAGE.
>
> This piuparts test prevents the installation of (most) files into
> /usr/share/doc with 'dpkg --path-exclude=...'.
>
> From the attached log (scroll to the bottom...):
>
>   Setting up python3 (3.7.5-1) ...
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/cmakegen.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/example_template.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/gmakegen.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/gmakegentest.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/report_tests.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/config/testparse.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/src/ksp/ksp/examples/tutorials/ex100.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/src/ksp/ksp/examples/tutorials/example100.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/src/ts/examples/tutorials/ex8.py'
>   [Errno 2] No such file or directory:
'/usr/share/doc/libpetsc3.11-dev-examples/examples/src/ts/examples/tutorials/extchem.py'
>   error running python rtupdate hook libpetsc3.11-dev-examples
>   dpkg: error processing package python3 (--configure):
>    installed python3 package post-installation script subprocess returned
error exit status 4
>   dpkg: dependency problems prevent configuration of
libpetsc3.11-dev-examples:
>    libpetsc3.11-dev-examples depends on python3:any; however:
>     Package python3 is not configured yet.
>
>   dpkg: error processing package libpetsc3.11-dev-examples (--configure):
>    dependency problems - leaving unconfigured
>   Processing triggers for libc-bin (2.29-3) ...
>   Errors were encountered while processing:
>    python3
>    libpetsc3.11-dev-examples
>

With this fix, there is no more issue with piuparts.
I have checked that the package pestc 3.11 can be installed on Ubuntu Eoan
without problem

Hope it helps
Best
C
--- petsc-3.11.4+dfsg1/debian/rules	2019-11-11 18:52:48.000000000 +0100
+++ my-petsc-3.11.4+dfsg1/debian/rules	2019-12-06 10:27:40.251657187 +0100
@@ -292,17 +365,22 @@
 override_dh_install:
 	dh_install -p$(PETSC_REAL_PACKAGE) --sourcedir $(PACKAGE_REAL_INSTALL_DIR)  $(PETSC_REAL_DIR_PREFIX)/lib/libpetsc_real.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)
 	dh_install -p$(PETSC_REAL_DEV_PACKAGE) --sourcedir $(PACKAGE_REAL_INSTALL_DIR) --autodest --exclude=*html --exclude=conf/uninstall.py --exclude=libpetsc_real.so.$(PETSC_VERSION) --exclude=share/ --exclude=include/petsc/ --exclude=lib/petsc/bin/  usr
-	
+
 	dh_install -p$(PETSC_REAL_DEBUG_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR) --autodest --exclude=*html --exclude=conf/uninstall.py --exclude=share/ --exclude=include/petsc/ --exclude=lib/petsc/bin/  usr
-	
+
 	dh_install -p$(PETSC_COMPLEX_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_INSTALL_DIR)  $(PETSC_COMPLEX_DIR_PREFIX)/lib/libpetsc_complex.so.$(PETSC_VERSION)  usr/lib/$(DEB_HOST_MULTIARCH)
 	dh_install -p$(PETSC_COMPLEX_DEV_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_INSTALL_DIR) --autodest --exclude=*html --exclude=conf/uninstall.py --exclude=libpetsc_complex.so.$(PETSC_VERSION) --exclude=share/ --exclude=include/petsc/ --exclude=lib/petsc/bin/  usr
-	
+
 	dh_install -p$(PETSC_COMPLEX_DEBUG_PACKAGE) --sourcedir $(PACKAGE_COMPLEX_DEBUG_INSTALL_DIR) --autodest --exclude=*html --exclude=conf/uninstall.py --exclude=share/ --exclude=include/petsc/ --exclude=lib/petsc/bin/  usr
-	
+
 	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX) --exclude=share/petsc/examples/ --exclude=share/petsc/datafiles/  share  usr/share/petsc/$(PETSC_SONAME_VERSION)
 	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX) --exclude=*html  include/petsc  usr/share/petsc/$(PETSC_SONAME_VERSION)/include
 	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX)  lib/petsc/bin  usr/share/petsc/$(PETSC_SONAME_VERSION)/lib/petsc
+	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX)  share/petsc/examples/config/*.py  usr/share/petsc/$(PETSC_SONAME_VERSION)/examples/config
+	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX)  share/petsc/examples/src/ksp/ksp/examples/tutorials/*.py  usr/share/petsc/$(PETSC_SONAME_VERSION)/examples/src/ksp/ksp/examples/tutorials
+	dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX)  share/petsc/examples/src/ts/examples/tutorials/*.py  usr/share/petsc/$(PETSC_SONAME_VERSION)/examples/src/ts/examples/tutorials
+	# dh_install -p$(PETSC_DEV_COMMON_PACKAGE) --sourcedir $(PACKAGE_REAL_DEBUG_INSTALL_DIR)/$(PETSC_REAL_DIR_DEBUG_PREFIX)  share/petsc/datafiles  usr/share/petsc/$(PETSC_SONAME_VERSION)
+
 	# use local js scripts
 	if [ -d debian/$(PETSC_DEV_COMMON_PACKAGE)/usr/share/petsc/$(PETSC_SONAME_VERSION)/share/petsc/saws ]; then \
 	  find debian/$(PETSC_DEV_COMMON_PACKAGE)/usr/share/petsc/$(PETSC_SONAME_VERSION)/share/petsc/saws -name "*html" | \
@@ -310,8 +388,8 @@
 	        s|http://www.mcs.anl.gov/research/projects/saws/js/jquery-ui.*.js|file://usr/share/javascript/jquery-ui/jquery-ui.js|; \
 		s|http://cdn.mathjax.org/mathjax/latest/MathJax.js|file:///usr/share/javascript/mathjax/MathJax.js|" ; \
 	fi
-	
-	dh_install -p$(PETSC_DEV_EXAMPLE_PACKAGE)
+
+	dh_install -p$(PETSC_DEV_EXAMPLE_PACKAGE) --exclude=*.py
 
 override_dh_fixperms-arch:
 	dh_fixperms
@@ -323,7 +401,7 @@
 
 override_dh_fixperms-indep:
 	dh_fixperms
-	chmod a-x debian/$(PETSC_DEV_EXAMPLE_PACKAGE)/usr/share/doc/$(PETSC_DEV_EXAMPLE_PACKAGE)/examples/config/example_template.py
+	chmod a-x debian/$(PETSC_DEV_COMMON_PACKAGE)/usr/share/petsc/$(PETSC_SONAME_VERSION)/examples/config/example_template.py
 	chmod a-x debian/$(PETSC_DEV_EXAMPLE_PACKAGE)/usr/share/doc/$(PETSC_DEV_EXAMPLE_PACKAGE)/examples/src/mat/examples/tests/ex24.c
 	# python auxiliary modules and support files need not be executable
 	# let PetscBinaryIO_tests.py remain executable, but add hashbang
@@ -363,7 +441,8 @@
 override_dh_python3:
 	dh_python3 --shebang=/usr/bin/python3
 	dh_python3 --shebang=/usr/bin/python3 -p$(PETSC_DEV_COMMON_PACKAGE) /usr/share/petsc/$(PETSC_SONAME_VERSION)/lib/petsc/bin
-	dh_python3 --shebang=/usr/bin/python3 -p$(PETSC_DEV_EXAMPLE_PACKAGE) /usr/share/doc/$(PETSC_DEV_EXAMPLE_PACKAGE)
+	dh_python3 --shebang=/usr/bin/python3 -p$(PETSC_DEV_COMMON_PACKAGE) /usr/share/petsc/$(PETSC_SONAME_VERSION)/examples
+	# dh_python3 --shebang=/usr/bin/python3 -p$(PETSC_DEV_EXAMPLE_PACKAGE) /usr/share/doc/$(PETSC_DEV_EXAMPLE_PACKAGE)
 
 override_dh_installdeb:
 	dh_installdeb
--- petsc-3.11.4+dfsg1/debian/libpetsc3.11-dev-examples.links	2019-11-11 18:52:48.000000000 +0100
+++ my-petsc-3.11.4+dfsg1/debian/libpetsc3.11-dev-examples.links	2019-12-04 16:34:22.446434730 +0100
@@ -1,3 +1,14 @@
 #! /bin/sh
 echo usr/share/doc/${PETSC_DOC_PACKAGE}/docs usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/docs
 echo usr/share/doc/${PETSC_DOC_PACKAGE}/include usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/include
+
+echo usr/share/petsc/3.11/examples/config/cmakegen.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/config/cmakegen.py
+echo usr/share/petsc/3.11/examples/config/example_template.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/config/example_template.py
+echo usr/share/petsc/3.11/examples/config/gmakegen.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/config/gmakegen.py
+echo usr/share/petsc/3.11/examples/config/gmakegentest.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/config/gmakegentest.py
+echo usr/share/petsc/3.11/examples/config/report_tests.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/config/report_tests.py
+echo usr/share/petsc/3.11/examples/config/testparse.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/config/testparse.py
+echo usr/share/petsc/3.11/examples/src/ksp/ksp/examples/tutorials/ex100.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/src/ksp/ksp/examples/tutorials/ex100.py
+echo usr/share/petsc/3.11/examples/src/ksp/ksp/examples/tutorials/example100.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/src/ksp/ksp/examples/tutorials/example100.py
+echo usr/share/petsc/3.11/examples/src/ts/examples/tutorials/ex8.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/src/ts/examples/tutorials/ex8.py
+echo usr/share/petsc/3.11/examples/src/ts/examples/tutorials/extchem.py usr/share/doc/${PETSC_DEV_EXAMPLE_PACKAGE}/examples/src/ts/examples/tutorials/extchem.py

Reply via email to