diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 357: Delete temporarily added proxy echo commands

Message ID 20120723030016.2724.7549.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Spring Zhang July 23, 2012, 3 a.m. UTC
Merge authors:
  Spring Zhang (qzhang)
Related merge proposals:
  https://code.launchpad.net/~qzhang/lava-dispatcher/fix-1025829/+merge/115644
  proposed by: Spring Zhang (qzhang)
  review: Approve - Andy Doan (doanac)
------------------------------------------------------------
revno: 357 [merge]
committer: Spring Zhang <spring.zhang@linaro.org>
branch nick: lava-dispatcher
timestamp: Mon 2012-07-23 10:58:42 +0800
message:
  Delete temporarily added proxy echo commands
modified:
  lava_dispatcher/actions/lava-test.py
  lava_dispatcher/client/base.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/actions/lava-test.py'
--- lava_dispatcher/actions/lava-test.py	2012-06-26 07:02:55 +0000
+++ lava_dispatcher/actions/lava-test.py	2012-07-19 02:59:59 +0000
@@ -143,10 +143,10 @@ 
             if lava_proxy:
                 session.run("sh -c 'export http_proxy=%s'" % lava_proxy)
                 session.run("echo 'Acquire::http::proxy \"%s\";' > /etc/apt/apt.conf.d/30proxy" % lava_proxy)
-                session.run("cat /etc/apt/apt.conf.d/30proxy")
             else:
-                session.run("echo '' > /etc/apt/apt.conf.d/30proxy")
-                session.run("cat /etc/apt/apt.conf.d/30proxy")
+                # If the rootfs is new generated, the cmd will fail,
+                # just ignore it
+                session.run("rm -f /etc/apt/apt.conf.d/30proxy")
 
             _install_lava_test(self.client, session)
 

=== modified file 'lava_dispatcher/client/base.py'
--- lava_dispatcher/client/base.py	2012-07-21 22:56:42 +0000
+++ lava_dispatcher/client/base.py	2012-07-23 02:58:42 +0000
@@ -396,12 +396,9 @@ 
             self.proc.expect(prompt_str, timeout=30)
             self.proc.sendline("echo 'Acquire::http::proxy \"%s\";' > /etc/apt/apt.conf.d/30proxy" % lava_proxy)
             self.proc.expect(prompt_str, timeout=30)
-            self.proc.sendline("cat /etc/apt/apt.conf.d/30proxy")
-            self.proc.expect(prompt_str, timeout=30)
         else:
-            self.proc.sendline("echo '' > /etc/apt/apt.conf.d/30proxy")
-            self.proc.expect(prompt_str, timeout=30)
-            self.proc.sendline("cat /etc/apt/apt.conf.d/30proxy")
+            # If the rootfs is new generated, the cmd will fail, just ignore it
+            self.proc.sendline("rm -f /etc/apt/apt.conf.d/30proxy")
             self.proc.expect(prompt_str, timeout=30)