From 9ac735bb8c0dec5628a33d907adb3fc02fd902e8 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 21 Nov 2017 14:23:36 -0500 Subject: tests: Use apt-get to install a deb so that depends get resolved. Instead of using 'dpkg -i' to install a package and then running apt-get -f install, to hope that it would install needed dependencies we can just use 'apt-get' directly to do the install. The 'dpkg/apt-get -f' path was a problem if the installed deb was older than the available deb. In that case it would get replaced. --- tests/cloud_tests/setup_image.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/cloud_tests') diff --git a/tests/cloud_tests/setup_image.py b/tests/cloud_tests/setup_image.py index 6672ffb3..179f40db 100644 --- a/tests/cloud_tests/setup_image.py +++ b/tests/cloud_tests/setup_image.py @@ -50,9 +50,9 @@ def install_deb(args, image): LOG.debug(msg) remote_path = os.path.join('/tmp', os.path.basename(args.deb)) image.push_file(args.deb, remote_path) - cmd = 'dpkg -i {}; apt-get install --yes -f'.format(remote_path) - image.execute(cmd, description=msg) - + image.execute( + ['apt-get', 'install', '--allow-downgrades', '--assume-yes', + remote_path], description=msg) # check installed deb version matches package fmt = ['-W', "--showformat=${Version}"] (out, err, exit) = image.execute(['dpkg-deb'] + fmt + [remote_path]) -- cgit v1.2.3