Merge lp:~larryprice/libertine/broken-chroot-packages into lp:libertine

Proposed by Larry Price
Status: Merged
Approved by: Christopher Townsend
Approved revision: 271
Merged at revision: 266
Proposed branch: lp:~larryprice/libertine/broken-chroot-packages
Merge into: lp:libertine
Diff against target: 52 lines (+7/-8)
2 files modified
python/libertine/Libertine.py (+5/-6)
tools/libertine-container-manager (+2/-2)
To merge this branch: bzr merge lp:~larryprice/libertine/broken-chroot-packages
Reviewer Review Type Date Requested Status
Christopher Townsend Approve
Libertine CI Bot continuous-integration Approve
Review via email: mp+299347@code.launchpad.net

Commit message

Set DEBIAN_FRONTEND directly in environment for chroot containers.

Description of the change

Set DEBIAN_FRONTEND directly in environment for chroot containers.

To post a comment you must log in.
Revision history for this message
Christopher Townsend (townsend) wrote :

Is it possible to just use "os.environ['DEBIAN_FRONTEND'] = 'readline'" for both backend types?

review: Needs Information
271. By Larry Price

Turns out LXC containers can also use os.environ

Revision history for this message
Libertine CI Bot (libertine-ci-bot) wrote :

PASSED: Continuous integration, rev:271
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/41/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/libertine/job/build/159
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=default/121
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=default/121
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=default/121
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=vivid+overlay,testname=default/121
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=xenial+overlay,testname=default/121
    SUCCESS: https://jenkins.canonical.com/libertine/job/test-0-autopkgtest/label=i386,release=yakkety,testname=default/121
    None: https://jenkins.canonical.com/libertine/job/lp-generic-update-mp/126/console
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-0-fetch/162
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=vivid+overlay/147
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=xenial+overlay/147
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-1-sourcepkg/release=yakkety/147
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=vivid+overlay/140/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=xenial+overlay/140/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=amd64,release=yakkety/140/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=vivid+overlay/140/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=xenial+overlay/140/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/140
        deb: https://jenkins.canonical.com/libertine/job/build-2-binpkg/arch=i386,release=yakkety/140/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/libertine/job/lp-libertine-ci/41/rebuild

review: Approve (continuous-integration)
Revision history for this message
Christopher Townsend (townsend) wrote :

Ok, looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'python/libertine/Libertine.py'
2--- python/libertine/Libertine.py 2016-07-01 16:48:11 +0000
3+++ python/libertine/Libertine.py 2016-07-07 16:00:29 +0000
4@@ -157,10 +157,9 @@
5
6 return ret
7 else:
8- cmd = apt_command_prefix(verbosity) + " install '" + package_name + "'"
9 if readline:
10- cmd = "env DEBIAN_FRONTEND=readline " + cmd
11- return self.run_in_container(cmd) == 0
12+ os.environ['DEBIAN_FRONTEND'] = 'readline'
13+ return self.run_in_container(apt_command_prefix(verbosity) + " install '" + package_name + "'") == 0
14
15 def configure_command(self, command, *args, verbosity=1):
16 """
17@@ -321,10 +320,10 @@
18 """
19 try:
20 with ContainerRunning(self.container):
21- cmd = apt_command_prefix(verbosity) + " purge '" + package_name + "'"
22 if readline:
23- cmd = "env DEBIAN_FRONTEND=readline " + cmd
24- if self.container.run_in_container(cmd) != 0:
25+ os.environ['DEBIAN_FRONTEND'] = 'readline'
26+
27+ if self.container.run_in_container(apt_command_prefix(verbosity) + " purge '" + package_name + "'") != 0:
28 return False
29 return self.container.run_in_container(apt_command_prefix(verbosity) + "autoremove --purge") == 0
30 except RuntimeError as e:
31
32=== modified file 'tools/libertine-container-manager'
33--- tools/libertine-container-manager 2016-07-05 20:44:14 +0000
34+++ tools/libertine-container-manager 2016-07-07 16:00:29 +0000
35@@ -147,7 +147,7 @@
36 self.containers_config.update_package_install_status(container_id, package_name, "removing")
37
38 container = LibertineContainer(container_id)
39- if not container.remove_package(package_name, verbosity, readline):
40+ if not container.remove_package(package_name, verbosity, readline) and fallback_status == 'installed':
41 self.containers_config.update_package_install_status(container_id, package_name, fallback_status)
42 return False
43
44@@ -259,7 +259,7 @@
45
46 def fix_integrity(self, args):
47 for container in self.containers_config.container_list['containerList']:
48- if container['installStatus'] != 'ready':
49+ if 'installStatus' not in container or container['installStatus'] != 'ready':
50 self.destroy_container_by_id(container['id'])
51 continue
52 LibertineContainer(container['id']).exec_command('dpkg --configure -a')

Subscribers

People subscribed via source and target branches