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
=== modified file 'Makefile'
--- Makefile 2012-09-21 14:58:20 +0000
+++ Makefile 2012-09-24 16:15:25 +0000
@@ -1,6 +1,14 @@
1python := python2.71python := python2.7
2
3# Network activity can be suppressed by setting offline=true (or any
4# non-empty string) at the command-line.
5ifeq ($(offline),)
2buildout := bin/buildout6buildout := bin/buildout
3virtualenv := virtualenv7virtualenv := virtualenv
8else
9buildout := bin/buildout buildout:offline=true
10virtualenv := virtualenv --never-download
11endif
412
5# Python enum modules.13# Python enum modules.
6py_enums := $(wildcard src/*/enum.py)14py_enums := $(wildcard src/*/enum.py)
@@ -27,13 +35,6 @@
27 bin/py bin/ipy \35 bin/py bin/ipy \
28 $(js_enums)36 $(js_enums)
2937
30# Note: the following target may not be needed. It remains as an
31# experiment, to see if it helps the situation with building MAAS in
32# the QA environment, which is isolated from the Internet at large.
33build-offline: buildout := $(buildout) buildout:offline=true
34build-offline: virtualenv := $(virtualenv) --never-download
35build-offline: build
36
37all: build doc38all: build doc
3839
39# Install all packages required for MAAS development & operation on40# Install all packages required for MAAS development & operation on
@@ -170,7 +171,6 @@
170171
171define phony_targets172define phony_targets
172 build173 build
173 build-offline
174 check174 check
175 clean175 clean
176 dbharness176 dbharness