Bug 1043390 - Don't use getSourceRepo on local builds; r=glandium
☠☠ backed out by 9d4a8353f1f6 ☠ ☠
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 07 Aug 2014 21:29:39 -0400
changeset 198465 87f53a100db001abcf645a2b941e52aa2fc1cddb
parent 198464 7dc089c4bd76f43aa771ee9d8117057c42fbe076
child 198466 25b9c248cbbd65a9d0d772585558758819fa5fbe
push id27272
push useremorley@mozilla.com
push dateFri, 08 Aug 2014 14:41:27 +0000
treeherdermozilla-central@96a566fa1599 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1043390
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1043390 - Don't use getSourceRepo on local builds; r=glandium
b2g/app/Makefile.in
build/Makefile.in
toolkit/components/telemetry/Makefile.in
toolkit/content/Makefile.in
toolkit/mozapps/installer/package-name.mk
toolkit/mozapps/installer/packager.mk
toolkit/xre/Makefile.in
--- a/b2g/app/Makefile.in
+++ b/b2g/app/Makefile.in
@@ -19,21 +19,16 @@ INSTALL_TARGETS += UA_UPDATE
 
 # Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/rules.mk
 
 APP_ICON = b2g
 
-source_repo ?= $(call getSourceRepo,$(srcdir)/..)
-ifneq (,$(filter http%,$(source_repo)))
-  DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
-endif
-
 ifeq ($(OS_ARCH),WINNT)
 REDIT_PATH = $(LIBXUL_DIST)/bin
 endif
 
 APP_BINARY = $(MOZ_APP_NAME)$(BIN_SUFFIX)
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -28,20 +28,22 @@ DEFINES += -DAPP_BUILDID=$(APP_BUILDID)
 
 APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
 
 MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node|short}\n' 2>/dev/null))
 ifdef MOZ_SOURCE_STAMP
 DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
 endif
 
+ifdef MOZILLA_OFFICIAL
 source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
 ifneq (,$(source_repo))
   DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
 endif
+endif
 
 endif
 
 # Put a useful .gdbinit in the bin directory, to be picked up automatically
 # by GDB when we debug executables there.
 # NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
 GDBINIT_FILES := $(topsrcdir)/.gdbinit
 GDBINIT_OBJDIR_FILES = $(topsrcdir)/.gdbinit
--- a/toolkit/components/telemetry/Makefile.in
+++ b/toolkit/components/telemetry/Makefile.in
@@ -3,20 +3,22 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 USE_RCS_MK := 1
 include $(topsrcdir)/config/makefiles/rcs.mk
 
 DEFINES += -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"'
 
+ifdef MOZILLA_OFFICIAL
 MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))
 ifdef MOZ_HISTOGRAMS_VERSION
 DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)'
 endif
+endif
 
 INSTALL_TARGETS += histoenums
 histoenums_FILES := TelemetryHistogramEnums.h
 histoenums_DEST = $(DIST)/include/mozilla
 histoenums_TARGET := export
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/content/Makefile.in
+++ b/toolkit/content/Makefile.in
@@ -11,19 +11,21 @@ DEFINES += \
   -DCPPFLAGS='$(CPPFLAGS)' \
   $(NULL)
 
 MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null)
 ifdef MOZ_SOURCE_STAMP
 DEFINES += -DSOURCE_CHANGESET='$(MOZ_SOURCE_STAMP)'
 endif
 
+ifdef MOZILLA_OFFICIAL
 source_repo ?= $(call getSourceRepo)
 ifneq (,$(filter http%,$(source_repo)))
   DEFINES += -DSOURCE_REPO='$(source_repo)'
 else ifneq (,$(strip $(source_repo)))
   DEFINES += -DSOURCE_GIT_COMMIT='$(source_repo)'
 endif
+endif
 
 ifndef BUILD_HOSTNAME
   BUILD_HOSTNAME = $(shell hostname -s || hostname)
 endif
 DEFINES += -DBUILD_HOSTNAME='$(BUILD_HOSTNAME)'
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -140,17 +140,19 @@ ifndef INCLUDED_RCS_MK
 endif
 
 MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))
 
 ###########################################################################
 # bug: 746277 - preserve existing functionality.
 # MOZILLA_DIR="": cd $(SPACE); hg # succeeds if ~/.hg exists
 ###########################################################################
+ifdef MOZILLA_OFFICIAL
 MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL))
+endif
 
 MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
 MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
 
 # JavaScript Shell
 PKG_JSSHELL = $(DIST)/jsshell-$(MOZ_PKG_PLATFORM).zip
 
 endif # PACKAGE_NAME_MK_INCLUDED
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -212,17 +212,17 @@ RPM_CMD = \
   --target $(TARGET_CPU) \
   --buildroot $(RPMBUILD_TOPDIR)/BUILDROOT \
   --define 'moz_app_name $(MOZ_APP_NAME)' \
   --define 'moz_app_displayname $(MOZ_APP_DISPLAYNAME)' \
   --define 'moz_app_version $(MOZ_APP_VERSION)' \
   --define 'moz_numeric_app_version $(MOZ_NUMERIC_APP_VERSION)' \
   --define 'moz_rpm_release $(MOZ_RPM_RELEASE)' \
   --define 'buildid $(BUILDID)' \
-  --define 'moz_source_repo $(MOZ_SOURCE_REPO)' \
+  $(if $(MOZ_SOURCE_REPO),--define 'moz_source_repo $(MOZ_SOURCE_REPO)') \
   --define 'moz_source_stamp $(MOZ_SOURCE_STAMP)' \
   --define 'moz_branding_directory $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)' \
   --define '_topdir $(RPMBUILD_TOPDIR)' \
   --define '_rpmdir $(RPMBUILD_RPMDIR)' \
   --define '_sourcedir $(RPMBUILD_SOURCEDIR)' \
   --define '_specdir $(RPMBUILD_SPECDIR)' \
   --define '_srcrpmdir $(RPMBUILD_SRPMDIR)' \
   --define '_builddir $(RPMBUILD_BUILDDIR)' \
@@ -752,24 +752,26 @@ make-package: FORCE
 	$(MAKE) make-package-internal
 	$(TOUCH) $@
 
 GARBAGE += make-package
 
 make-sourcestamp-file::
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
 	@echo '$(BUILDID)' > $(MOZ_SOURCESTAMP_FILE)
+ifdef MOZ_SOURCE_REPO
 	@echo '$(MOZ_SOURCE_REPO)/rev/$(MOZ_SOURCE_STAMP)' >> $(MOZ_SOURCESTAMP_FILE)
+endif
 
 .PHONY: make-buildinfo-file
 make-buildinfo-file:
 	$(PYTHON) $(MOZILLA_DIR)/toolkit/mozapps/installer/informulate.py \
 		$(MOZ_BUILDINFO_FILE) \
 		BUILDID=$(BUILDID) \
-		MOZ_SOURCE_REPO=$(MOZ_SOURCE_REPO) \
+		$(addprefix MOZ_SOURCE_REPO=,MOZ_SOURCE_REPO=$(MOZ_SOURCE_REPO)) \
 		MOZ_SOURCE_STAMP=$(MOZ_SOURCE_STAMP) \
 		MOZ_PKG_PLATFORM=$(MOZ_PKG_PLATFORM)
 
 # The install target will install the application to prefix/lib/appname-version
 # In addition if INSTALL_SDK is set, it will install the development headers,
 # libraries, and IDL files as follows:
 # dist/include -> prefix/include/appname-version
 # dist/idl -> prefix/share/idl/appname-version
--- a/toolkit/xre/Makefile.in
+++ b/toolkit/xre/Makefile.in
@@ -19,21 +19,23 @@ TOOLKIT_EM_VERSION=$(shell $(PERL) $(top
 # Valid if null: {warn,error}IfEmpty
 DEFINES += -DTOOLKIT_EM_VERSION='"$(TOOLKIT_EM_VERSION)"'
 
 MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))
 ifdef MOZ_SOURCE_STAMP
 
   INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
 
-  source_repo := $(call getSourceRepo)
+  ifdef MOZILLA_OFFICIAL
+    source_repo := $(call getSourceRepo)
 
-  # extra sanity check for old versions of hg, no showconfig support
-  ifneq (,$(filter http%,$(source_repo)))
-    INIARGS += --sourcerepo=$(source_repo)
+    # extra sanity check for old versions of hg, no showconfig support
+    ifneq (,$(filter http%,$(source_repo)))
+      INIARGS += --sourcerepo=$(source_repo)
+    endif
   endif
 
 endif # MOZ_SOURCE_STAMP
 
 GRE_BUILDID   := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null)))
 $(call errorIfEmpty,GRE_MILESTONE GRE_BUILDID)
 
 DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)