Sophie

Sophie

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

SL_rpm_show_arch-1.1-1.noarch.rpm

POSTIN

/bin/sh
#
# This modifies /usr/lib/rpm/macros to add the arch to queries
#
if [ -f /usr/lib/rpm/macros ] ; then
	if ! `grep -q %%{name}-%%{version}-%%{release}.%%{arch} /usr/lib/rpm/macros` ; then
		sed -i -e "s:%%{name}-%%{version}-%%{release}.%%{arch}:%%{name}-%%{version}-%%{release}:"  /usr/lib/rpm/macros
	fi
fi

POSTUN

/bin/sh
if [ "$1" = "0" ] ; then
	#
	# This modifies /usr/lib/rpm/macros to add the arch to queries
	#
	if [ -f /usr/lib/rpm/macros ] ; then
		sed -i -e "s:%%{name}-%%{version}-%%{release}.%%{arch}:%%{name}-%%{version}-%%{release}:"  /usr/lib/rpm/macros
	fi
fi

Triggers

rpm

/bin/sh
if [ -f /usr/lib/rpm/macros ] ; then
	if ! `grep -q %%{name}-%%{version}-%%{release}.%%{arch} /usr/lib/rpm/macros` ; then
		cat /usr/lib/rpm/macros | sed -e "s:%%{name}-%%{version}-%%{release}:%%{name}-%%{version}-%%{release}.%%{arch}:"  > /usr/lib/rpm/macros.tmp
		cat /usr/lib/rpm/macros.tmp > /usr/lib/rpm/macros
		rm /usr/lib/rpm/macros.tmp
	fi
fi