test-rebuild.sh: test if package is installed before yum install

epel9
Jens Petersen 12 years ago
parent 1433654678
commit 82a1405dd8

@ -32,7 +32,7 @@ mkdir -p $TMP/
PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm))
for i in $PKGS; do for i in $PKGS; do
sudo yum install -q $i rpm -q --quiet $i || sudo yum install -q $i
for k in list requires provides scripts; do for k in list requires provides scripts; do
rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test
rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed

Loading…
Cancel
Save