Try to continue with previous installation if there is such.
Change-Id: I4a757c10243c93f122fbfb3ad9e203fa0ce64606
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
+ # Try to fix interrupted installations
+ cmd = 'dpkg --configure -a'
+ stdout = ssh_no_error(ssh, cmd, sudo=True)
+ print "###TI {}".format(stdout)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
cmd = "dpkg -l | grep vpp"
ret, _, _ = ssh.exec_command(cmd)
if ret == 0:
+ # Try to fix interrupted installations
+ cmd = 'dpkg --configure -a'
+ stdout = ssh_no_error(ssh, cmd, sudo=True)
+ print "###TI {}".format(stdout)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)
# Try to remove installed vpp.* packages
cmd = 'apt-get purge -y "vpp.*"'
stdout = ssh_no_error(ssh, cmd, sudo=True)