This patch fixes a long, long standing bug (in fact, I
started to dig and gave up when I looked the last 5
changes to the file, dating 8 months ago): The method
use_rsync(), used to verify whether autotest should
be copied to the client using scp or rsync does not
return in case we detect that the client machine does
have rsync installed, so the first use_rsync() check
will allways return None. Subsequent checks will
return True because during the first run an attribute
will be set to True, making the function return properly.

Bottom line, we will *allways* end up copying all the
client code to the client machine using scp instead of rsync,
which should be way faster after the 1st time the client
got copied to the machine. We probably didn't notice this
because:

1) Most of the time we'll run with the key

[PACKAGES]
serve_packages_from_autoserv: True

Which makes the amount of data being copied way smaller,
so we won't bother

2) Other times we'd be installing the client using the
packaging system.

Anyway, it's a bug, should be fixed and will probably
help people using autoserv to install autotest in remote
machines (as I was doing this week :))

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
---
 server/hosts/abstract_ssh.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/server/hosts/abstract_ssh.py b/server/hosts/abstract_ssh.py
index ef179f5..3d8d9e9 100644
--- a/server/hosts/abstract_ssh.py
+++ b/server/hosts/abstract_ssh.py
@@ -69,6 +69,7 @@ class AbstractSSHHost(SiteHost):
         if not self._use_rsync:
             logging.warn("rsync not available on remote host %s -- disabled",
                          self.hostname)
+        return self._use_rsync
 
 
     def _check_rsync(self):
-- 
1.7.2.3

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to