openmamba-netsrpms: correct "Already installed" message when installation fails due to an rpm build error

This commit is contained in:
Silvan Calarco 2012-12-10 01:40:37 +01:00
parent 9cf1a6e2d7
commit 493b87818b

View File

@ -33,8 +33,6 @@ function check_if_already_installed() {
rpm -q $1 &>/dev/null
if [ $? -eq 0 ]; then
notify-send -a $"Network software installation" -i $icon "$pckname" "$pckname: "$"already installed."
else
notify-send -a $"Network software installation" -i $icon "$pckname" $"There was an error installing"" $pckname!"
fi
}
@ -112,7 +110,7 @@ for pckname in $PACKAGES; do
rpmbuild --rebuild $SRPM_PATH --define="%_rpmdir $tmpdir"
if [ $? -gt 0 ]; then
echo "$me: "$"error rebuilding \`$SRPM_PATH'."" "$"Aborting..." >&2
check_if_already_installed $pckname
notify-send -a $"Network software installation" -i $icon "$pckname" $"There was an error installing"" $pckname!"
exit 255
fi
RPM_PATH=`find $tmpdir -name \*.rpm`