Merge lp:~doanac/ubuntu-ci-services-itself/kernel-build into lp:ubuntu-ci-services-itself

Proposed by Andy Doan
Status: Merged
Approved by: Francis Ginther
Approved revision: 389
Merged at revision: 398
Proposed branch: lp:~doanac/ubuntu-ci-services-itself/kernel-build
Merge into: lp:ubuntu-ci-services-itself
Prerequisite: lp:~doanac/ubuntu-ci-services-itself/imgbuild-private
Diff against target: 29 lines (+9/-3)
1 file modified
image-builder/imagebuilder/cloud_image.py (+9/-3)
To merge this branch: bzr merge lp:~doanac/ubuntu-ci-services-itself/kernel-build
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Francis Ginther Approve
Review via email: mp+211144@code.launchpad.net

Commit message

image-builder: add ability to install a kernel package

Description of the change

Get Paul's fix in for installing a kernel package.

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

This are plars changes updated to the latest trunk. I've also been testing these changes on at least 3 non-kernel tickets today. All looks good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:389
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/432/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/432/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'image-builder/imagebuilder/cloud_image.py'
2--- image-builder/imagebuilder/cloud_image.py 2014-03-14 21:56:01 +0000
3+++ image-builder/imagebuilder/cloud_image.py 2014-03-14 21:56:01 +0000
4@@ -78,7 +78,9 @@
5
6 def _chrooted(chroot, cmd):
7 log.info('Running command in image: {0}'.format(cmd))
8- output = subprocess.check_output(['chroot', chroot] + cmd.split(" "))
9+ if type(cmd) is not list:
10+ cmd = cmd.split(' ')
11+ output = subprocess.check_output(['chroot', chroot] + cmd)
12 if output:
13 log.info(output)
14
15@@ -121,8 +123,12 @@
16 '''Run commands in the chroot to do update the sources and add packages
17 '''
18 status_cb('Adding requested packages to the image...')
19- _chrooted(chroot, "/usr/bin/apt-get install -y {pkglist}".format(
20- pkglist=string.join(pkglist, " ")))
21+ os.environ['DEBIAN_FRONTEND'] = 'noninteractive'
22+ _chrooted(chroot,
23+ ['/bin/bash', '-c',
24+ ('/usr/bin/apt-get -o Dpkg::Options::=\"--force-confdef\" '
25+ '-o Dpkg::Options::=\"--force-confold\" install -y '
26+ '{pkglist}'.format(pkglist=string.join(pkglist, " ")))])
27 _chrooted(chroot, "/usr/bin/apt-get clean")
28
29 #create a big null data file and remove it to make it more compressable

Subscribers

People subscribed via source and target branches