← Back to team overview

ubuntu-bugcontrol team mailing list archive

[Merge] ~alexmurray/ubuntu-qa-tools:uvt-upgrade-reliability-fix into ubuntu-qa-tools:master

 

Alex Murray has proposed merging ~alexmurray/ubuntu-qa-tools:uvt-upgrade-reliability-fix into ubuntu-qa-tools:master.

Commit message:
uvt: make uvt upgrade more reliable

It seems apt can still hang waiting for input with the current invocation so add
DEBIAN_FRONTEND=noninteractive along with -o DPkg::Options::=--force-confnew to
make it more reliable to work without user input.

Signed-off-by: Alex Murray <alex.murray@xxxxxxxxxxxxx>



Requested reviews:
  Ubuntu Bug Control (ubuntu-bugcontrol)

For more details, see:
https://code.launchpad.net/~alexmurray/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/482614
-- 
Your team Ubuntu Bug Control is requested to review the proposed merge of ~alexmurray/ubuntu-qa-tools:uvt-upgrade-reliability-fix into ubuntu-qa-tools:master.
diff --git a/vm-tools/uvt b/vm-tools/uvt
index 8b6e326..f5e34ce 100755
--- a/vm-tools/uvt
+++ b/vm-tools/uvt
@@ -1080,7 +1080,7 @@ def vm_clone_update_config(ori_name, clone_name):
 def vm_update_packages(vm_name, autoremove=False, snapshot=True):
     '''Does a dist-upgrade inside a VM'''
 
-    command = "while fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do sleep 1; done; apt-get update; while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; apt-get -y --force-yes -o DPkg::Options::=--force-confdef upgrade; apt-get -y --force-yes -o DPkg::Options::=--force-confdef dist-upgrade ; apt-get clean"
+    command = "while fuser /var/lib/apt/lists/lock >/dev/null 2>&1; do sleep 1; done; DEBIAN_FRONTEND=noninteractive apt-get update; while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confnew upgrade; DEBIAN_FRONTEND=noninteractive apt-get -y --force-yes -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confnew dist-upgrade ; apt-get clean"
 
     # handle debconf: (TERM is not set,...' errors
     if 'TERM' in os.environ:

Follow ups