← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lp-mailman:fix-tarball into lp-mailman:master

 

Colin Watson has proposed merging ~cjwatson/lp-mailman:fix-tarball into lp-mailman:master.

Commit message:
Make deployment tarball more complete

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lp-mailman/+git/lp-mailman/+merge/452251

The tarball we were building omitted the actual Mailman code, and so failed to build on deployed systems; it was also constructed in such a way that we ended up trying to pull the dependencies repository again unnecessarily.  This change produces tarballs that we can actually deploy.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-mailman:fix-tarball into lp-mailman:master.
diff --git a/.gitignore b/.gitignore
index 6e60468..4893d7e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,4 @@ callgrind.out.*
 !logs/README.txt
 /logs
 /wheels
+/.bootstrapped
diff --git a/Makefile b/Makefile
index ad7ce32..edb8961 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ PY=$(WD)/bin/py
 PYTHONPATH:=$(WD)/lib:${PYTHONPATH}
 VERBOSITY=-vv
 
-DEPENDENCY_REPO ?= lp:~launchpad/lp-mailman/+git/dependencies
+DEPENDENCY_REPO ?= https://git.launchpad.net/~launchpad/lp-mailman/+git/dependencies
 DEPENDENCY_DIR ?= $(WD)/download-cache
 
 # virtualenv and pip fail if setlocale fails, so force a valid locale.
@@ -86,7 +86,8 @@ build: compile
 # Create or update $(DEPENDENCY_DIR) if possible.  If the directory exists
 # but isn't a git repository, then assume that we're doing a deployment and
 # have already been provided with a suitable dependencies directory.
-bootstrap:
+bootstrap: .bootstrapped
+.bootstrapped:
 	if [ -d $(DEPENDENCY_DIR)/.git ]; then \
 		git -C $(DEPENDENCY_DIR) pull; \
 	elif [ -d $(DEPENDENCY_DIR) ]; then \
@@ -95,6 +96,7 @@ bootstrap:
 		git clone $(DEPENDENCY_REPO) $(DEPENDENCY_DIR); \
 	fi
 	utilities/update-sourcecode
+	touch $@
 
 # LP_SOURCEDEPS_PATH should point to the sourcecode directory, but we
 # want the parent directory where the download-cache and env directories
diff --git a/utilities/build-tarball b/utilities/build-tarball
index 0bb7df0..3ca78b8 100755
--- a/utilities/build-tarball
+++ b/utilities/build-tarball
@@ -27,6 +27,9 @@ echo "Creating deployment tarball in $output_dir"
 mkdir -p "$output_dir"
 (
     git ls-files | sed 's,^,./,'
+    bzr ls -d sourcecode/mailman -R | sed 's,^,./sourcecode/mailman/,'
+    # Deployments shouldn't bootstrap again.
+    echo ./.bootstrapped
     echo ./version-info.py
     find ./wheels/ -name \*.whl -print
 ) | sort >"$output_dir/.files"