Bug 1338099 - Fix the source packager to produce a non empty sourcestamp.txt file. r=ted a=gchang
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Tue, 21 Feb 2017 06:43:00 -0500
changeset 378641 ba9e4cf76c3ebcbefd5a32d2bf29aa98826e38d6
parent 378640 6345d678d9c3fc12561ace81c2bada7d6b21d801
child 378642 0fc2172500a97355bfd91b37e26b1c23e77d5d32
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, gchang
bugs1338099
milestone53.0a2
Bug 1338099 - Fix the source packager to produce a non empty sourcestamp.txt file. r=ted a=gchang MozReview-Commit-ID: 1DsBkS1eSX8
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -95,18 +95,17 @@ make-package-internal: prepare-package m
 
 make-package: FORCE
 	$(MAKE) make-package-internal
 	$(TOUCH) $@
 
 GARBAGE += make-package
 
 make-sourcestamp-file::
-	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
-	@echo '$(BUILDID)' > $(MOZ_SOURCESTAMP_FILE)
+	@awk '$$2 == "MOZ_BUILDID" {print $$3}' $(DEPTH)/buildid.h > $(MOZ_SOURCESTAMP_FILE)
 ifdef MOZ_INCLUDE_SOURCE_INFO
 	@awk '$$2 == "MOZ_SOURCE_URL" {print $$3}' $(DEPTH)/source-repo.h >> $(MOZ_SOURCESTAMP_FILE)
 endif
 
 .PHONY: make-buildinfo-file
 make-buildinfo-file:
 	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/informulate.py \
 		$(MOZ_BUILDINFO_FILE) \
@@ -156,17 +155,17 @@ upload: checksum
 		$(CHECKSUM_FILES)
 
 # source-package creates a source tarball from the files in MOZ_PKG_SRCDIR,
 # which is either set to a clean checkout or defaults to $topsrcdir
 source-package:
 	@echo 'Generate the sourcestamp file'
 	# Make sure to have repository information available and then generate the
 	# sourcestamp file.
-	$(MAKE) -C $(DEPTH) 'source-repo.h'
+	$(MAKE) -C $(DEPTH) 'source-repo.h' 'buildid.h'
 	$(MAKE) make-sourcestamp-file
 	@echo 'Packaging source tarball...'
 	# We want to include the sourcestamp file in the source tarball, so copy it
 	# in the root source directory. This is useful to enable telemetry submissions
 	# from builds made from the source package with the correct revision information.
 	# Don't bother removing it as this is only used by automation.
 	@cp $(MOZ_SOURCESTAMP_FILE) '$(MOZ_PKG_SRCDIR)/sourcestamp.txt'
 	$(MKDIR) -p $(DIST)/$(PKG_SRCPACK_PATH)