Sophie

Sophie

distrib > Scientific%20Linux > 5x > i386 > by-pkgid > fda04dbe6b33376a44158b79cda63522 > scriptlet

openmpi-devel-1.4-7.el5.i386.rpm

POSTIN

/bin/sh
# Any and all upgrades/installs should remove all old dangling alternatives
# links except for the one case of openmpi-1.2.3 still installed because
# its %preun will fail if it can't remove the alternatives link itself.
# So, remove the links, and if 1.2.3 is installed, put it back.
/usr/sbin/alternatives --remove mpicc \
    	/usr/bin/opal_wrapper-32 >/dev/null 2>&1
/usr/sbin/alternatives --remove mpicc \
    	/usr/bin/opal_wrapper-1.2.3-gcc-32 >/dev/null 2>&1
rpm -q openmpi-libs-1.2.3.i386 > /dev/null 2>&1
if [ $? -eq 0 ]; then
    # 1.2.3 is installed, recreate the link
    /usr/sbin/alternatives --install /usr/bin/mpicc mpicc \
	/usr/bin/opal_wrapper-1.2.3-gcc-32 11 >/dev/null 2>&1
fi
# We can't fail
/bin/true