Fixing debian support for LSB testing
Investigating the problem Martin reported about the LSB test support for
debian, I found 3 bugs I left when we took the decision of installing a
newer version of the LSB test manager, different from the original LTP
bundle. This patch fixes 2 bugs:
package.py fixes:
* ignoring dpkg errors when querying for package status
* making conversion function return the absolute path of the package
converted.
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1392 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/package.py b/client/bin/package.py
index d7bbd2b..c7a472d 100644
--- a/client/bin/package.py
+++ b/client/bin/package.py
@@ -137,7 +137,7 @@
package_info['version'] = system_output(v_cmd)
package_info['arch'] = system_output(a_cmd)
# Checking if package is installed
- package_status = system_output(i_cmd)
+ package_status = system_output(i_cmd, ignorestatus = 1)
not_inst_pattern = re.compile('not-installed', re.IGNORECASE)
dpkg_not_installed = re.search(not_inst_pattern, package_status)
if dpkg_not_installed:
@@ -262,8 +262,9 @@
e_msg = 'Convertion to format %s not implemented' % destination_format
raise NotImplementedError(e_msg)
- return 'Package %s successfuly converted to %s' % \
- (package, destination_format)
+ print 'Package %s successfuly converted to %s' % (package, destination_format)
+
+ return os.path.abspath(package)
def os_support():