[petsc] 01/02: Drop old /usr/lib/libpetsc.so alternatives in debug packages.

Drew Parsons dparsons at moszumanska.debian.org
Sat Apr 9 15:27:24 UTC 2016


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

dparsons pushed a commit to tag debian/3.6.3.dfsg2-3
in repository petsc.

commit a6c4d97f69cf4e901112075ed4e1317ab1a43f86
Author: Drew Parsons <dparsons at debian.org>
Date:   Sat Apr 9 20:27:09 2016 +0800

    Drop old /usr/lib/libpetsc.so alternatives in debug packages.
    
    Poor forgotten debug packages.
---
 debian/changelog                           |  6 ++++++
 debian/libpetsc-complex-3.6.3-dbg.postinst | 13 +++++++++++--
 debian/libpetsc3.6.3-dbg.postinst          | 13 +++++++++++--
 3 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fa86e4d..fc79140 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+petsc (3.6.3.dfsg2-3) UNRELEASED; urgency=medium
+
+  * Drop old /usr/lib/libpetsc.so alternatives in debug packages.
+
+ -- Drew Parsons <dparsons at debian.org>  Sat, 09 Apr 2016 20:15:12 +0800
+
 petsc (3.6.3.dfsg2-2) unstable; urgency=medium
 
   * complex dev package should Suggest: complex (not real) debug package
diff --git a/debian/libpetsc-complex-3.6.3-dbg.postinst b/debian/libpetsc-complex-3.6.3-dbg.postinst
index 0c1c3a4..8ac3142 100644
--- a/debian/libpetsc-complex-3.6.3-dbg.postinst
+++ b/debian/libpetsc-complex-3.6.3-dbg.postinst
@@ -7,11 +7,20 @@ PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_DEBUG_ARCH=${PETSC_ARCH}-complex-debug
 PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )
 
+# alternative libpetsc.so.multiarch is deprecated
+# test if libpetsc.so.multiarch is still in use, so remove old petsc alternatives
+# This should be safe since Conflicts are set up with the dev package versions using deprecated libpetsc.so.multiarch.
+if update-alternatives --query petsc | grep libpetsc.so.multiarch > /dev/null ; then
+  echo Removing deprecated petsc alternatives using libpetsc.so.multiarch.
+  for alt in `update-alternatives --list petsc`; do
+    update-alternatives --remove petsc ${alt}
+  done
+fi
+
 # Make alternatives links
 if [ "$1" = "configure" ]; then
 update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH} ${PETSC_VERSION_NUMBER}33 \
-  --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_complex.so.${PETSC_VERSION} \
-  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so.multiarch /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_complex.so.${PETSC_VERSION} \
+  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_complex.so.${PETSC_VERSION} \
   --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/include \
   --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/pkgconfig/PETSc.pc \
   --slave /usr/share/octave/site/m/petsc petsc-octave /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/share/petsc/matlab
diff --git a/debian/libpetsc3.6.3-dbg.postinst b/debian/libpetsc3.6.3-dbg.postinst
index a1ec306..9bd345c 100644
--- a/debian/libpetsc3.6.3-dbg.postinst
+++ b/debian/libpetsc3.6.3-dbg.postinst
@@ -7,11 +7,20 @@ PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_DEBUG_ARCH=${PETSC_ARCH}-real-debug
 PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )
 
+# alternative libpetsc.so.multiarch is deprecated
+# test if libpetsc.so.multiarch is still in use, so remove old petsc alternatives
+# This should be safe since Conflicts are set up with the dev package versions using deprecated libpetsc.so.multiarch.
+if update-alternatives --query petsc | grep libpetsc.so.multiarch > /dev/null ; then
+  echo Removing deprecated petsc alternatives using libpetsc.so.multiarch.
+  for alt in `update-alternatives --list petsc`; do
+    update-alternatives --remove petsc ${alt}
+  done
+fi
+
 # Make alternatives links
 if [ "$1" = "configure" ]; then
 update-alternatives --install /usr/lib/petsc petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH} ${PETSC_VERSION_NUMBER}37 \
-  --slave /usr/lib/libpetsc.so libpetsc.so /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_real.so.${PETSC_VERSION} \
-  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so.multiarch /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_real.so.${PETSC_VERSION} \
+  --slave /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc.so libpetsc.so /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/libpetsc_real.so.${PETSC_VERSION} \
   --slave /usr/include/petsc petscinclude /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/include \
   --slave /usr/lib/pkgconfig/PETSc.pc PETSc.pc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/lib/pkgconfig/PETSc.pc \
   --slave /usr/share/octave/site/m/petsc petsc-octave /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_DEBUG_ARCH}/share/petsc/matlab

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



More information about the debian-science-commits mailing list