Sophie

Sophie

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

mvapich-1.2.0-0.3562.2.el5.i386.rpm

PREUN

/bin/sh
# Count how many copies of this particular package are currently installed,
# knowing that on upgrade the new package being installed is already in this
# list by the time we are run, and that we are in the list too as we aren't
# removed until after our scripts complete.  If our count comes back as just
# 1, then we are the last copy of this particular version and we need to
# remove our registration.  This is true regardless of wheter this is an
# upgrade or an erase.  Note: we have to keep our arch in the query too or
# else multilib installations throw this count off.
COUNT=`rpm -q mvapich-1.2.0.i386 | wc -l`
if [ $COUNT -eq 1 ]; then
    mpi-selector --unregister mvapich-1.2.0-gcc-i386 \
            --yes >/dev/null 2>&1
fi
/bin/true

POSTIN

/bin/sh
# It is safe to reregister the same setup at every upgrade/reinstall/etc.
mpi-selector --register mvapich-1.2.0-gcc-i386 \
    --source-dir /usr/lib/mvapich/1.2.0-gcc/bin --yes >/dev/null 2>&1
# We can't fail
/bin/true