Bug 1338099 - Fix the source packager to produce a non empty sourcestamp.txt file. r=ted
authorAlessio Placitelli <alessio.placitelli@gmail.com>
Tue, 21 Feb 2017 06:43:00 -0500
changeset 373109 8d2a0d1f223178383805aba9d4fcaac3f5c88fda
parent 373108 97795c1d467d1fc260f7b345837e245f23d726c1
child 373110 ddc511090d07d991ca58c35e4a986bb83b3b25b3
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1338099
milestone54.0a1
Bug 1338099 - Fix the source packager to produce a non empty sourcestamp.txt file. r=ted MozReview-Commit-ID: 1DsBkS1eSX8
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -94,18 +94,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) \
@@ -155,17 +154,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)