Changed kernel.auto_kernel() to use the package manager to fetch kernel
URLs instead of giving them to the rpm_kernel instances. Cleaned up the
package manager a bit and added --connection-timeout parameter to the
executed wget to help in case of failed hosts when the hostanme resolves
to more than one IP.

Signed-off-by: Mihai Rusu <dizzy@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3463 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index 2ce41ec..9ec59a9 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -687,7 +687,7 @@
             for rpm_pack in self.rpm_package:
                 vmlinux = utils.system_output(
                         'rpm -q -l -p %s | grep /boot/vmlinux' % rpm_pack)
-            utils.system('cd /; rpm2cpio %s | cpio -imuv .%s'
+            utils.system('cd /; rpm2cpio %s | cpio -imuv .%s 2>&1'
                          % (rpm_pack, vmlinux))
             if not os.path.exists(vmlinux):
                 raise error.TestError('%s does not exist after installing %s'
@@ -796,7 +796,7 @@
 
 
 # pull in some optional site-specific path pre-processing
-preprocess_path = utils.import_site_function(__file__, 
+preprocess_path = utils.import_site_function(__file__,
     "autotest_lib.client.bin.site_kernel", "preprocess_path",
     _preprocess_path_dummy)
 
@@ -816,9 +816,8 @@
     if kernel_paths[0].endswith('.rpm'):
         rpm_paths = []
         for kernel_path in kernel_paths:
-            if utils.is_url(kernel_path) or os.path.exists(kernel_path):
+            if os.path.exists(kernel_path):
                 rpm_paths.append(kernel_path)
-
             else:
                 # Fetch the rpm into the job's packages directory and pass it to
                 # rpm_kernel