[petsc] 01/02: Move petsc3.7 alternatives handling to libpetsc3.7.5-dev

Drew Parsons dparsons at moszumanska.debian.org
Sun Feb 5 21:39:20 UTC 2017


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

dparsons pushed a commit to tag debian/3.7.5+dfsg1-4
in repository petsc.

commit d4077f820d649b0ac12e3a241ca0118dcf88abd0
Author: Drew Parsons <dparsons at debian.org>
Date:   Mon Feb 6 04:22:08 2017 +0800

    Move petsc3.7 alternatives handling to libpetsc3.7.5-dev
    
    move from libpetsc3.7-dev to libpetsc3.7.5-dev.
    
    Likewise for the petsc3.7-real alternative.
    
    Otherwise alternatives for older patch versions are left unowned when
    libpetsc3.7-dev gets upgraded.
    
    Similarly for petsc3.7-complex.
    
    Closes: #852514.
---
 debian/changelog                           |  4 ++++
 debian/libpetsc-complex-3.7-dev.postinst   | 25 -------------------------
 debian/libpetsc-complex-3.7-dev.prerm      | 18 ------------------
 debian/libpetsc-complex-3.7.5-dev.postinst |  8 ++++++++
 debian/libpetsc-complex-3.7.5-dev.prerm    |  7 +++++++
 debian/libpetsc3.7-dev.postinst            | 25 -------------------------
 debian/libpetsc3.7-dev.prerm               | 18 ------------------
 debian/libpetsc3.7.5-dev.postinst          |  9 +++++++++
 debian/libpetsc3.7.5-dev.prerm             |  9 +++++++++
 9 files changed, 37 insertions(+), 86 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2939197..19d79aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ petsc (3.7.5+dfsg1-4) UNRELEASED; urgency=medium
   * Don't duplicate -dev dependencies. -lhdf5 and -lsuperlu are
     invoked in PETSc.pc, so we Depend on their dev packages, we don't
     simply Recommend them.
+  * Move petsc3.7 and petsc3.7-real alternatives handling from
+    libpetsc3.7-dev to libpetsc3.7.5-dev. Similarly petsc3.7-complex. 
+    Otherwise alternatives for older patch versions are left unowned. 
+    Closes: #852514.
 
  -- Drew Parsons <dparsons at debian.org>  Sun, 22 Jan 2017 17:33:39 +0800
 
diff --git a/debian/libpetsc-complex-3.7-dev.postinst b/debian/libpetsc-complex-3.7-dev.postinst
deleted file mode 100644
index ee02cfc..0000000
--- a/debian/libpetsc-complex-3.7-dev.postinst
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh -e
-
-DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
-
-PETSC_VERSION=__PETSC_VERSION__
-PETSC_ARCH=${DEB_HOST_MULTIARCH}
-PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
-PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )
-SONAME=__PETSC_SONAME_VERSION__
-
-PETSC_DIR_COMPLEX=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}
-
-# Make alternatives links
-if [ "$1" = "configure" ]; then
-
-# alternative petsc for this soname (e.g. real or complex)
-update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
-
-# alternative complex petsc for this soname
-update-alternatives --install /usr/lib/petscdir/${SONAME}-complex petsc${SONAME}-complex ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
-
-fi
-
-
-#DEBHELPER#
diff --git a/debian/libpetsc-complex-3.7-dev.prerm b/debian/libpetsc-complex-3.7-dev.prerm
deleted file mode 100644
index 40532d6..0000000
--- a/debian/libpetsc-complex-3.7-dev.prerm
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh -e
-
-DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
-
-PETSC_VERSION=__PETSC_VERSION__
-PETSC_ARCH=${DEB_HOST_MULTIARCH}
-PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
-SONAME=__PETSC_SONAME_VERSION__
-
-PETSC_DIR_COMPLEX=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}
-
-# Remove alternatives links
-if [ "$1" = "remove" ]; then
-  update-alternatives --remove petsc${SONAME} ${PETSC_DIR_COMPLEX}
-  update-alternatives --remove petsc${SONAME}-complex ${PETSC_DIR_COMPLEX}
-fi
-
-#DEBHELPER#
diff --git a/debian/libpetsc-complex-3.7.5-dev.postinst b/debian/libpetsc-complex-3.7.5-dev.postinst
index 560cc11..e965749 100644
--- a/debian/libpetsc-complex-3.7.5-dev.postinst
+++ b/debian/libpetsc-complex-3.7.5-dev.postinst
@@ -2,6 +2,8 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
+SONAME=__PETSC_SONAME_VERSION__
+
 PETSC_VERSION=__PETSC_VERSION__
 PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
@@ -36,6 +38,12 @@ update-alternatives --install /usr/lib/petsc petsc ${PETSC_DIR_COMPLEX} ${PETSC_
 # alternative base version of petsc complex
 update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so libpetsc_complex.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so.${PETSC_VERSION} ${PETSC_VERSION_NUMBER}73
 
+# alternative petsc for this X.Y soname (e.g. real or complex)
+update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
+
+# alternative complex petsc for this X.Y soname
+update-alternatives --install /usr/lib/petscdir/${SONAME}-complex petsc${SONAME}-complex ${PETSC_DIR_COMPLEX} ${PETSC_VERSION_NUMBER}73
+
 fi
 
 
diff --git a/debian/libpetsc-complex-3.7.5-dev.prerm b/debian/libpetsc-complex-3.7.5-dev.prerm
index fa8d9a3..246174e 100644
--- a/debian/libpetsc-complex-3.7.5-dev.prerm
+++ b/debian/libpetsc-complex-3.7.5-dev.prerm
@@ -2,14 +2,21 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
+SONAME=__PETSC_SONAME_VERSION__
+
 PETSC_VERSION=__PETSC_VERSION__
 PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_COMPLEX_ARCH=${PETSC_ARCH}-complex
 
+PETSC_DIR_COMPLEX=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}
+
 # Remove alternatives links
 if [ "$1" = "remove" ]; then
   update-alternatives --remove petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_COMPLEX_ARCH}
   update-alternatives --remove libpetsc_complex.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_complex.so.${PETSC_VERSION}
+
+  update-alternatives --remove petsc${SONAME} ${PETSC_DIR_COMPLEX}
+  update-alternatives --remove petsc${SONAME}-complex ${PETSC_DIR_COMPLEX}
 fi
 
 #DEBHELPER#
diff --git a/debian/libpetsc3.7-dev.postinst b/debian/libpetsc3.7-dev.postinst
deleted file mode 100644
index b98eec0..0000000
--- a/debian/libpetsc3.7-dev.postinst
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh -e
-
-DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
-
-PETSC_VERSION=__PETSC_VERSION__
-PETSC_ARCH=${DEB_HOST_MULTIARCH}
-PETSC_REAL_ARCH=${PETSC_ARCH}-real
-PETSC_VERSION_NUMBER=$( echo ${PETSC_VERSION} | sed "s/\.//g" )
-SONAME=__PETSC_SONAME_VERSION__
-
-PETSC_DIR_REAL=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}
-
-# Make alternatives links
-if [ "$1" = "configure" ]; then
-
-# alternative petsc for this soname (e.g. real or complex)
-update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77
-
-# alternative real petsc for this soname
-update-alternatives --install /usr/lib/petscdir/${SONAME}-real petsc${SONAME}-real ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77
-
-fi
-
-
-#DEBHELPER#
diff --git a/debian/libpetsc3.7-dev.prerm b/debian/libpetsc3.7-dev.prerm
deleted file mode 100644
index 3995223..0000000
--- a/debian/libpetsc3.7-dev.prerm
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh -e
-
-DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
-
-PETSC_VERSION=__PETSC_VERSION__
-PETSC_ARCH=${DEB_HOST_MULTIARCH}
-PETSC_REAL_ARCH=${PETSC_ARCH}-real
-SONAME=__PETSC_SONAME_VERSION__
-
-PETSC_DIR_REAL=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}
-
-# Remove alternatives links
-if [ "$1" = "remove" ]; then
-  update-alternatives --remove petsc${SONAME} ${PETSC_DIR_REAL}
-  update-alternatives --remove petsc${SONAME}-real ${PETSC_DIR_REAL}
-fi
-
-#DEBHELPER#
diff --git a/debian/libpetsc3.7.5-dev.postinst b/debian/libpetsc3.7.5-dev.postinst
index 0021890..7c68cf4 100644
--- a/debian/libpetsc3.7.5-dev.postinst
+++ b/debian/libpetsc3.7.5-dev.postinst
@@ -2,6 +2,8 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
+SONAME=__PETSC_SONAME_VERSION__
+
 PETSC_VERSION=__PETSC_VERSION__
 PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_REAL_ARCH=${PETSC_ARCH}-real
@@ -35,6 +37,13 @@ update-alternatives --install /usr/lib/petsc petsc ${PETSC_DIR_REAL} ${PETSC_VER
 # alternative base version of petsc real
 update-alternatives --install /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so libpetsc_real.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so.${PETSC_VERSION} ${PETSC_VERSION_NUMBER}77
 
+# alternative petsc for this X.Y soname (e.g. real or complex)
+update-alternatives --install /usr/lib/petscdir/${SONAME} petsc${SONAME} ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77
+
+# alternative real petsc for this X.Y soname
+update-alternatives --install /usr/lib/petscdir/${SONAME}-real petsc${SONAME}-real ${PETSC_DIR_REAL} ${PETSC_VERSION_NUMBER}77
+
+
 fi
 
 
diff --git a/debian/libpetsc3.7.5-dev.prerm b/debian/libpetsc3.7.5-dev.prerm
index 6c58950..4380924 100644
--- a/debian/libpetsc3.7.5-dev.prerm
+++ b/debian/libpetsc3.7.5-dev.prerm
@@ -2,14 +2,23 @@
 
 DEB_HOST_MULTIARCH=__DEB_HOST_MULTIARCH__
 
+SONAME=__PETSC_SONAME_VERSION__
+
 PETSC_VERSION=__PETSC_VERSION__
 PETSC_ARCH=${DEB_HOST_MULTIARCH}
 PETSC_REAL_ARCH=${PETSC_ARCH}-real
 
+PETSC_DIR_REAL=/usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}
+
 # Remove alternatives links
 if [ "$1" = "remove" ]; then
   update-alternatives --remove petsc /usr/lib/petscdir/${PETSC_VERSION}/${PETSC_REAL_ARCH}
   update-alternatives --remove libpetsc_real.so /usr/lib/${DEB_HOST_MULTIARCH}/libpetsc_real.so.${PETSC_VERSION}
+
+  # remove general X.Y soname alternatives
+  update-alternatives --remove petsc${SONAME} ${PETSC_DIR_REAL}
+  update-alternatives --remove petsc${SONAME}-real ${PETSC_DIR_REAL}
+
 fi
 
 #DEBHELPER#

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