Bug 1043390 - Don't use getSourceRepo on local builds; r=glandium

This commit is contained in:
Ehsan Akhgari 2014-08-07 21:29:39 -04:00
parent a043c5f64b
commit d29ef9c03e
7 changed files with 18 additions and 11 deletions

View File

@ -24,11 +24,6 @@ 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

View File

@ -33,10 +33,12 @@ 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

View File

@ -8,10 +8,12 @@ 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

View File

@ -16,12 +16,14 @@ 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)

View File

@ -145,7 +145,9 @@ MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{
# 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

View File

@ -217,7 +217,7 @@ RPM_CMD = \
--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)' \
@ -757,14 +757,16 @@ 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)

View File

@ -24,11 +24,13 @@ 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