Sophie

Sophie

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

mvapich2-1.4-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 mvapich2-1.4.i386 | wc -l`
if [ $COUNT -eq 1 ]; then
    mpi-selector --unregister mvapich2-1.4-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 mvapich2-1.4-gcc-i386 \
    --source-dir /usr/lib/mvapich2/1.4-gcc/bin --yes >/dev/null 2>&1
# We can't fail
/bin/true