The following commit has been merged in the master branch:
commit dcbb3c6172fc76af68da63ea4b0104d34b0b6db3
Author: Ron <[email protected]>
Date:   Sun Feb 13 04:39:04 2011 +1030

    cowpoke: try to rsync the source files to the build host
    
    If rsync isn't available, then fall back to scp.  If it is, this can save
    repeatedly copying the orig.tar.* when building subsequent debian revisions.
    
    Thanks to Joachim Breitner for the idea and initial patch.
    
    Closes: #610072
    Signed-off-by: Ron Lee <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index f771c25..8d7c913 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,10 @@ devscripts (2.10.71) UNRELEASED; urgency=low
     which apt began downloading in newer versions instead of the Release file.
     (Closes: #613941) 
 
+  [ Ron Lee ]
+  * cowpoke: try to rsync source files to the build host.  (Closes: #610072)
+    Thanks to Joachim Breitner for the idea and initial patch.
+
  -- Patrick Schoenfeld <[email protected]>  Fri, 18 Feb 2011 14:10:22 +0100
 
 devscripts (2.10.70) unstable; urgency=low
diff --git a/scripts/cowpoke.1 b/scripts/cowpoke.1
index bf6b2b3..c149d4f 100644
--- a/scripts/cowpoke.1
+++ b/scripts/cowpoke.1
@@ -213,6 +213,9 @@ post-build sanity checking.  Upon completion, the build log 
and the results of
 automated checks will be recorded in the \fBINCOMING_DIR\fP.  If you wish to
 upload signed packages the build machine will also need \fBdput\fP(1) installed
 and configured to use the 'host' alias specified by \fBUPLOAD_QUEUE\fP.
+If \fBrsync\fP(1) is available on both the local and build machine, then it 
will
+be used to transfer the source package (this may save on some transfers of the
+orig.tar.* when building subsequent debian revisions).
 
 The user executing \fBcowpoke\fP must have ssh access to the build machine as
 the \fBBUILDD_USER\fP.  That user must be able to invoke cowbuilder as root by
diff --git a/scripts/cowpoke.sh b/scripts/cowpoke.sh
index b5fe70f..60a81ac 100755
--- a/scripts/cowpoke.sh
+++ b/scripts/cowpoke.sh
@@ -301,7 +301,11 @@ EOF
 chmod 755 "$REMOTE_SCRIPT"
 
 
-dcmd scp $DSC "$REMOTE_SCRIPT" "$BUILDD_USER$BUILDD_HOST:$INCOMING_DIR"
+if ! dcmd rsync -vP $DSC "$REMOTE_SCRIPT" 
"$BUILDD_USER$BUILDD_HOST:$INCOMING_DIR";
+then
+    dcmd scp $DSC "$REMOTE_SCRIPT" "$BUILDD_USER$BUILDD_HOST:$INCOMING_DIR"
+fi
+
 ssh -t "$BUILDD_USER$BUILDD_HOST" "\"$INCOMING_DIR/$REMOTE_SCRIPT\" && rm -f 
\"$INCOMING_DIR/$REMOTE_SCRIPT\""
 
 echo

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to