[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: libpsm2



Hi Brian,

On 08/12/2017 20:15, Brian Smith wrote:
>     libpsm2-2-compat - Preload library to provide PSM2 support for PSM
>         applications
> 

Wouldn't it be better if this shared library is handled using alternatives?

This will allow a user to take advantage of this library without the need
to fiddle with environment variables and makes its deployment even more
easier.

My proposal is implemented in the patch attached. I've used this on an HPC
cluster and found it neat. It we agree on this, I can add it to infinipath-psm
package as well.

Besides, libpsm2-2 and libpsm2-2-compat provide udev rules but do not call
"udevadm control --reload-rules >/dev/null 2>&1" in postinst.

Is udev auto-detecting new rules now?

Cheers,

-- 
Mehdi
--- /dev/null
+++ b/debian/libpsm2-2-compat.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+update-alternatives --install						\
+	/usr/lib/x86_64-linux-gnu/libpsm_infinipath.so.1		\
+	libpsm_infinipath.so.1						\
+	/usr/lib/x86_64-linux-gnu/psm2-compat/libpsm_infinipath.so.1	\
+	80
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+++ b/debian/libpsm2-2-compat.prerm
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" != "upgrade" ]; then
+    update-alternatives --remove	\
+	libpsm_infinipath.so.1		\
+	/usr/lib/x86_64-linux-gnu/psm2-compat/libpsm_infinipath.so.1
+fi
+
+#DEBHELPER#
+
+exit 0

Reply to: