Merge lp:~allenap/maas/offline-more 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: 1063
Proposed branch: lp:~allenap/maas/offline-more
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 40 lines (+8/-8)
1 file modified
Makefile (+8/-8)
To merge this branch: bzr merge lp:~allenap/maas/offline-more
Reviewer Review Type Date Requested Status
John A Meinel (community) Approve
Diogo Matsubara (community) Approve
Review via email: mp+126045@code.launchpad.net

Commit message

make offline=true <target> now keeps buildout and virtualenv off the network for all targets.

Previously there was a build-offline target that permitted an offline build only. This is a more general solution.

To post a comment you must log in.
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Looks good!

review: Approve
Revision history for this message
John A Meinel (jameinel) wrote :

It seems a little funny that the way it is defined you can do:
make offline=False

And it will build offline. However, I don't care a ton about that.

It seems more like something that you would want to set up per-site rather than something you have to think about passing to make. However, it is certainly better than not having it at all.

I wonder about doing:

buildout := bin/buildout buildout:offline=$(offline)

review: Approve
Revision history for this message
Gavin Panella (allenap) wrote :

> make offline=False

Yeah, that is a bit of a wart :-/

> buildout := bin/buildout buildout:offline=$(offline)

We'd still need to do something about virtualenv, but that seems okay, assuming buildout will cope with the empty string there.

In the fullness of time I'd like to remove buildout and settle with just one virtualenv. buildout has sucked away so much time compared to the benefits it brings. It tries to do too much but has more edge cases than monoclinic sulphur.

Revision history for this message
John A Meinel (jameinel) wrote :

I would tend to agree that buildout doesn't work quite as well as advertised in real situations.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2012-09-21 14:58:20 +0000
3+++ Makefile 2012-09-24 16:15:25 +0000
4@@ -1,6 +1,14 @@
5 python := python2.7
6+
7+# Network activity can be suppressed by setting offline=true (or any
8+# non-empty string) at the command-line.
9+ifeq ($(offline),)
10 buildout := bin/buildout
11 virtualenv := virtualenv
12+else
13+buildout := bin/buildout buildout:offline=true
14+virtualenv := virtualenv --never-download
15+endif
16
17 # Python enum modules.
18 py_enums := $(wildcard src/*/enum.py)
19@@ -27,13 +35,6 @@
20 bin/py bin/ipy \
21 $(js_enums)
22
23-# Note: the following target may not be needed. It remains as an
24-# experiment, to see if it helps the situation with building MAAS in
25-# the QA environment, which is isolated from the Internet at large.
26-build-offline: buildout := $(buildout) buildout:offline=true
27-build-offline: virtualenv := $(virtualenv) --never-download
28-build-offline: build
29-
30 all: build doc
31
32 # Install all packages required for MAAS development & operation on
33@@ -170,7 +171,6 @@
34
35 define phony_targets
36 build
37- build-offline
38 check
39 clean
40 dbharness