[Fai-commit] r5137 - people/michael/experimental

mt at alioth.debian.org mt at alioth.debian.org
Tue Sep 9 06:33:42 UTC 2008


Author: mt
Date: 2008-09-09 06:33:41 +0000 (Tue, 09 Sep 2008)
New Revision: 5137

Modified:
   people/michael/experimental/build-on-alioth
Log:
cleanup, added some comments, proper directory names and QUILT_* settings


Modified: people/michael/experimental/build-on-alioth
===================================================================
--- people/michael/experimental/build-on-alioth	2008-09-08 14:22:07 UTC (rev 5136)
+++ people/michael/experimental/build-on-alioth	2008-09-09 06:33:41 UTC (rev 5137)
@@ -80,6 +80,7 @@
 
 set -e
 
+# make sure no other build is running concurrently
 for i in `seq 1 21` ; do
   if [ $i -eq 21 ] ; then
     echo "Timed out!" 1>&2
@@ -93,21 +94,22 @@
   fi
 done
 
-
+# check arguments
 test -n "$REV" -a -n "$REPOS"
 
+# checkout the directories, if necessary
 if [ ! -d $storage/trunk-w-exp ] ; then
   svn co -r $REV file:///srv/svn.debian.org/svn/fai/trunk $storage/trunk-w-exp
   chmod -R g+wX $storage/trunk-w-exp
   find $storage/trunk-w-exp -type d -exec chmod g+s {} \;
 fi
-
 if [ ! -d $storage/trunk-w-exp/debian/patches ] ; then
   svn co -r $REV file:///srv/svn.debian.org/svn/fai/people/michael/experimental/patches $storage/trunk-w-exp/debian/patches
-  chmod -R g+wX $storage/trunk-w-exp/patches
-  find $storage/trunk-w-exp/patches -type d -exec chmod g+s {} \;
+  chmod -R g+wX $storage/trunk-w-exp/debian/patches
+  find $storage/trunk-w-exp/debian/patches -type d -exec chmod g+s {} \;
 fi
 
+# is this a commit to experimental?
 if svnlook dirs-changed -r $REV $REPOS | grep '^people/michael/experimental/' ; then
   svn revert $storage/trunk-w-exp/debian/rules
   svn revert $storage/trunk-w-exp/debian/changelog
@@ -116,11 +118,12 @@
   cd $storage
   rm -f fai*.deb fai*.changes fai*.dsc fai*.tar.gz
   cd trunk-w-exp
+  export QUILT_PC=$PWD/debian/.pc
+  export QUILT_PATCHES=$PWD/debian/patches
   mangle_version_number
   patch -p0 < $tmppatch
   build_changelog
-  dpkg-buildpackage -uc -us -d -I.svn -rfakeroot
-  dpkg_exit=$?
+  dpkg-buildpackage -uc -us -d -I.svn -rfakeroot && dpkg_exit=$? || dpkg_exit=$?
   echo "STATUS: dpkg-buildpackage exited with status $dpkg_exit"
   cd ..
   if [ $dpkg_exit -eq 0 ] ; then
@@ -140,7 +143,7 @@
     else
       rm $storage/LATEST_BUILD
     fi
-    REPLYTO="mt at debian.org" mail -s "FAI build of $REV failed!" $who_did_it at alioth.debian.org < $log
+    REPLYTO="mt at debian.org" mail -s "FAI build of $REV failed!" -c mt at debian.org $who_did_it at alioth.debian.org < $log
   fi
 fi
 
@@ -160,8 +163,6 @@
 if [ $err_found -eq 1 ] ; then
   mail -s "FAI build of $REV failed!" mt at alioth.debian.org < $log
   mv $log $storage/buildlog.failed.$REV
-else
-  mail -s "FAI build of $REV maybe successful" mt at alioth.debian.org < $log
 fi
 
 rm -f $log $tmppatch $storage/BUILDING




More information about the Fai-commit mailing list