Merge lp:~allenap/maas/update-acceptance-for-trusty into lp:~maas-committers/maas/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 1949
Proposed branch: lp:~allenap/maas/update-acceptance-for-trusty
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 48 lines (+8/-9)
1 file modified
acceptance/Makefile (+8/-9)
To merge this branch: bzr merge lp:~allenap/maas/update-acceptance-for-trusty
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+206607@code.launchpad.net

Commit message

Update acceptance/Makefile to work with newer versions of the LXC tools.

Description of the change

The way LXC works has changed a bit in Trusty, so I needed to change acceptance/Makefile to work with it.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

I'm going to self-approve this. I don't think anyone else cares :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'acceptance/Makefile'
2--- acceptance/Makefile 2013-09-03 15:47:06 +0000
3+++ acceptance/Makefile 2014-02-16 09:53:49 +0000
4@@ -33,14 +33,13 @@
5
6 # The container on which to base ephemerals.
7 container := maas-$(series)
8-containerdir := /var/lib/lxc/$(container)
9
10 ## Convenience definitions.
11
12 define ephexec
13 sudo LC_ALL=C SSH_ASKPASS=$(abspath ubuntupass) setsid \
14 lxc-start-ephemeral -b $(upstream) -o $(container) -u ubuntu -- \
15- DEBIAN_FRONTEND=noninteractive SUDO_ASKPASS=$(abspath ubuntupass)
16+ env DEBIAN_FRONTEND=noninteractive SUDO_ASKPASS=$(abspath ubuntupass)
17 endef
18
19 define ephexec-make
20@@ -65,9 +64,14 @@
21 @ls -1 *.deb
22 @touch $@
23
24-container: $(containerdir)
25+container: | services sudo
26+ifneq ($(shell sudo lxc-ls -1 $(container)),$(container))
27+ sudo lxc-create -n $(container) \
28+ -f /etc/lxc/default.conf -t ubuntu -- --release $(series)
29+ $(abspath update-container) $(container)
30+endif
31
32-container-update: $(containerdir) | services sudo
33+container-update: container | services sudo
34 $(abspath update-container) $(container)
35
36 services:
37@@ -124,11 +128,6 @@
38 source/debian: | source
39 bzr export $@ $(packaging)/debian
40
41-$(containerdir): | services sudo
42- sudo lxc-create -n $(container) \
43- -f /etc/lxc/default.conf -t ubuntu -- --release $(series)
44- $(abspath update-container) $(container)
45-
46 ## Miscellaneous.
47
48 sudo: