fix personality for cross-rpm fix, run rebuilddb again, and pass topleve verbose...
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 15 Dec 2009 14:45:55 +0000 (14:45 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 15 Dec 2009 14:45:55 +0000 (14:45 +0000)
vbuild-init-vserver.sh
vbuild-nightly.sh

index 7e92353..2c3553d 100755 (executable)
@@ -195,6 +195,7 @@ function setup_vserver () {
        function translate_rpm_hashes () {
            set -x
            set -e
+           local personality="$1"; shift
            local vserver="$1"; shift
            # need to have utilities installed
            type -p file
@@ -205,13 +206,14 @@ function setup_vserver () {
            files=$(cd $host_dir ; file * | grep Hash | cut -d: -f 1)
            for file in $files; do
                (cd $host_dir && mv $file ${file}-foreign)
-               /usr/lib/rpm/rpmdb_dump $host_dir/${file}-foreign | vserver $VERBOSE $vserver exec /usr/lib/rpm/rpmdb_load $guest_dir/$file
+               /usr/lib/rpm/rpmdb_dump $host_dir/${file}-foreign | $personality vserver $VERBOSE $vserver exec /usr/lib/rpm/rpmdb_load $guest_dir/$file
            done
+           $personality vserver $VERBOSE $vserver exec rpm --rebuilddb
            return 0
        }
 
        # try the simple way, if that fails try to cross fix the rpm hashes
-       $personality vserver $VERBOSE $vserver exec rpm --rebuilddb || translate_rpm_hashes $vserver
+       $personality vserver $VERBOSE $vserver exec rpm --rebuilddb || translate_rpm_hashes $personality $vserver
     fi
 
     # check if the vserver kernel is using VSERVER_DEVICE (vdevmap) support
index 62bae81..47f8315 100755 (executable)
@@ -258,7 +258,7 @@ function run_log () {
 
     # need to proceed despite of set -e
     success=true
-    ssh 2>&1 -n ${testmaster_ssh} ${testdir}/run_log --build ${build_SVNPATH} --url ${url} $configs $test_env --verbose --all || success=
+    ssh 2>&1 -n ${testmaster_ssh} ${testdir}/run_log --build ${build_SVNPATH} --url ${url} $configs $test_env $VERBOSE --all || success=
 
     # gather logs in the vserver
     mkdir -p /vservers/$BASE/build/testlogs
@@ -441,7 +441,7 @@ function main () {
            B) DO_TEST= ;;
            T) DO_BUILD= ;;
            n) DRY_RUN="-n" ;;
-           v) set -x ;;
+           v) set -x ; VERBOSE="-v" ;;
            7) BASE="$(date +%a|tr A-Z a-z)-@FCDISTRO@" ;;
            i) IFNAME=$OPTARG ;;
            h|*) usage ;;
@@ -573,7 +573,7 @@ function main () {
            svn export $build_SVNPATH $tmpdir
             # Create vserver
            cd $tmpdir
-           ./vbuild-init-vserver.sh -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${BASE} 
+           ./vbuild-init-vserver.sh $VERBOSE -f ${FCDISTRO} -d ${PLDISTRO} -p ${PERSONALITY} -i ${IFNAME} ${BASE} 
            # cleanup
            cd -
            rm -rf $tmpdir
@@ -618,11 +618,11 @@ function main () {
 
        # publish to the web so run_log can find them
        rm -rf $WEBPATH/$BASE ; mkdir -p $WEBPATH/$BASE/{RPMS,SRPMS}
-       rsync --archive --delete --verbose /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
-       [[ -n "$PUBLISH_SRPMS" ]] && rsync --archive --delete --verbose /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
+       rsync --archive --delete $VERBOSE /vservers/$BASE/build/RPMS/ $WEBPATH/$BASE/RPMS/
+       [[ -n "$PUBLISH_SRPMS" ]] && rsync --archive --delete $VERBOSE /vservers/$BASE/build/SRPMS/ $WEBPATH/$BASE/SRPMS/
        # publish myplc-release if this exists
        release=/vservers/$BASE/build/myplc-release
-       [ -f $release ] && rsync --verbose $release $WEBPATH/$BASE
+       [ -f $release ] && rsync $VERBOSE $release $WEBPATH/$BASE
 
         # create yum repo and sign packages.
        if [ -n "$SIGNYUMREPO" ] ; then