From cac957ffdd0dae01dd67e2d5790f1c96f1fe970b Mon Sep 17 00:00:00 2001 From: Thomas Oulevey Date: May 26 2015 08:22:11 +0000 Subject: - Added -x option to fix buildroot easily when you are not awake on Monday morning. - Bug fix for -common inheritance. --- diff --git a/scripts/create_sig.sh b/scripts/create_sig.sh index b896b97..3dcf5d9 100755 --- a/scripts/create_sig.sh +++ b/scripts/create_sig.sh @@ -14,6 +14,7 @@ OPTIONS: -r SIG project release name : cloud6-openstack- -t DISTTAGS : "el7 el7.centos el7_0" -c COLLECTION : mariadb100 (a single collection can be used at this time) + -x : delete old -build tag and then recreate. EOF } @@ -23,8 +24,9 @@ optiont=false optionc=false optionp=false optionr=false +optionx=false -while getopts ":hd:s:t:c:p:r:" OPTION +while getopts ":hxd:s:t:c:p:r:" OPTION do case $OPTION in h) @@ -55,6 +57,9 @@ do optionc=true COLLECTIONS="${OPTARG}" ;; + x) + optionx=true + ;; ?) exit 0 ;; @@ -141,7 +146,16 @@ do TAG="$TAG-$COLLECTIONS" fi $KOJI list-tags | grep $R_SIG-$TAG-build &> /dev/null - [ $? -eq 0 ] && echo " -> $R_SIG-$TAG-build tag already exists. skipping." && continue + if [ $? -eq 0 ] + then + if ( $optionx ) + then + echo " -> deleting buildroot $R_SIG-$TAG-build" + $KOJI remove-tag $R_SIG-$TAG-build + else + echo " -> $R_SIG-$TAG-build tag already exists. skipping." && continue + fi + fi echo " -> creating $R_SIG-$TAG" $KOJI add-tag --arches "$ARCHES" $R_SIG-$TAG-build $KOJI add-target $R_SIG-$TAG $R_SIG-$TAG-build $R_SIG-candidate @@ -166,6 +180,10 @@ do $KOJI list-tags | grep $P_SIG-common-candidate &> /dev/null [ $? -eq 0 ] && echo "Adding $P_SIG-common-candidate as inheritance" && $KOJI add-tag-inheritance --priority 15 $R_SIG-$TAG-build $P_SIG-common-candidate fi + # Add project common if it exists + $KOJI list-tags | grep $SIG-common-candidate &> /dev/null + [ $? -eq 0 ] && echo "Adding $SIG-common-candidate as inheritance" && $KOJI add-tag-inheritance --priority 20 $R_SIG-$TAG-build $SIG-common-candidate + # Check if disttag has corresponding buildsys-macros-disttag $KOJI list-tagged buildsys${DIST} | grep buildsys-macros-$REALTAG &> /dev/null if [ $? -gt 0 ] then