On 11/11/09 at 22:34 +0100, Manuel Prinz wrote: > Am Mittwoch, den 11.11.2009, 14:13 +0100 schrieb Lucas Nussbaum: > > Let's fix the only really broken thing: the mpiexec/mpirun problem in > > openmpi and mpich2. After that, we can downgrade this bug and discuss > > the rest of it. > > I uploaded a fixed package a few minutes ago that uses "mpirun" as > master alternative and raised the priority to 40 for alternatives > "mpirun" (openmpi-bin) and "mpi" (libopenmpi-dev).
Hi Manuel, I'm still not convinced. For example, in preinst, you probably shouldn't --remove-all mpirun. Attached is a patch that works (apparently). I plan to do something very similar in mpich2. Can you review/comment? -- | Lucas Nussbaum | lu...@lucas-nussbaum.net http://www.lucas-nussbaum.net/ | | jabber: lu...@nussbaum.fr GPG: 1024D/023B3F4F |
diff -u openmpi-1.3.3/debian/openmpi-bin.preinst openmpi-1.3.3/debian/openmpi-bin.preinst --- openmpi-1.3.3/debian/openmpi-bin.preinst +++ openmpi-1.3.3/debian/openmpi-bin.preinst @@ -2,14 +2,6 @@ set -e -# mpirun and mpiexec seemed to be used as a master alternative by some MPI -# package. But currently, all MPI packages have the mpicc alternative installed -# as a slave link. We remove the link here in order to resolve bug #532008, -# #534740, and #544372. - -update-alternatives --quiet --remove-all mpirun >/dev/null 2>&1 || true -update-alternatives --quiet --remove-all mpiexec >/dev/null 2>&1 || true - #DEBHELPER# exit 0 diff -u openmpi-1.3.3/debian/openmpi-bin.prerm openmpi-1.3.3/debian/openmpi-bin.prerm --- openmpi-1.3.3/debian/openmpi-bin.prerm +++ openmpi-1.3.3/debian/openmpi-bin.prerm @@ -4,7 +4,6 @@ if [ "$1" != "upgrade" ]; then update-alternatives --remove mpirun /usr/bin/mpirun.openmpi - update-alternatives --remove mpiexec /usr/bin/mpiexec.openmpi fi #DEBHELPER# diff -u openmpi-1.3.3/debian/changelog openmpi-1.3.3/debian/changelog --- openmpi-1.3.3/debian/changelog +++ openmpi-1.3.3/debian/changelog @@ -1,3 +1,9 @@ +openmpi (1.3.3-4) unstable; urgency=low + + * Fix alternatives upgrade. + + -- Lucas Nussbaum <lu...@lucas-nussbaum.net> Tue, 17 Nov 2009 16:36:55 -0600 + openmpi (1.3.3-3) unstable; urgency=low * Removed mpiexec alternative, as discussed in #552429. It is now a slave diff -u openmpi-1.3.3/debian/openmpi-bin.postinst openmpi-1.3.3/debian/openmpi-bin.postinst --- openmpi-1.3.3/debian/openmpi-bin.postinst +++ openmpi-1.3.3/debian/openmpi-bin.postinst @@ -2,7 +2,26 @@ set -e -update-alternatives --quiet --remove-all mpiexec >/dev/null 2>&1 || true +case "$1" in + configure) + # Continue below + ;; + abort-upgrade|abort-remove|abort-deconfigure) + exit 0; + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0; + ;; +esac + +# so, we are running with $1 = configure +# openmpi versions before 1.3.3-2 were using two alternatives where other +# MPI implementations were using only one, which breaks. Clean up +# our mess. +if [ "$2" != "" ] && dpkg --compare-versions "$2" le "1.3.3-2"; then + update-alternatives --remove mpiexec /usr/bin/mpiexec.openmpi +fi update-alternatives \ --install /usr/bin/mpirun mpirun /usr/bin/mpirun.openmpi 40 \