Bug 1333769 - Explicitly pass the version to MAR. r=rail
(for "Nightly l10n repacks generate wrong complete MARs")
MozReview-Commit-ID: 8cIno7eFKve
--- a/tools/update-packaging/Makefile.in
+++ b/tools/update-packaging/Makefile.in
@@ -55,25 +55,27 @@ dir-stage := $(call mkdir_deps,$(STAGE_D
complete-patch:: $(dir-stage)
ifeq ($(OS_TARGET), WINNT)
test -f $(UNPACKAGE)
$(RM) -rf '$(PACKAGE_DIR)'
cd $(PACKAGE_BASE_DIR) && $(INNER_UNMAKE_PACKAGE)
endif
MAR=$(MAR_BIN) \
+ MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
$(srcdir)/make_full_update.sh \
'$(DIST)/$(COMPLETE_MAR)' \
'$(PACKAGE_DIR)'
ifdef MOZ_SIGN_CMD
$(MOZ_SIGN_CMD) -f mar '$(DIST)/$(COMPLETE_MAR)'
endif
partial-patch:: $(dir-stage)
MAR=$(MAR_BIN) \
MBSDIFF=$(MBSDIFF_BIN) \
+ MOZ_PRODUCT_VERSION=$(MOZ_APP_VERSION) \
$(srcdir)/make_incremental_update.sh \
'$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar' \
'$(SRC_BUILD)' \
'$(DST_BUILD)'
ifdef MOZ_SIGN_CMD
$(MOZ_SIGN_CMD) -f mar '$(STAGE_DIR)/$(PKG_UPDATE_BASENAME).partial.$(SRC_BUILD_ID)-$(DST_BUILD_ID).mar'
endif
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -102,17 +102,23 @@ done
# Append remove instructions for any dead files.
notice ""
notice "Adding file and directory remove instructions from file 'removed-files'"
append_remove_instructions "$targetdir" "$updatemanifestv2" "$updatemanifestv3"
$BZIP2 -z9 "$updatemanifestv2" && mv -f "$updatemanifestv2.bz2" "$updatemanifestv2"
$BZIP2 -z9 "$updatemanifestv3" && mv -f "$updatemanifestv3.bz2" "$updatemanifestv3"
-eval "$MAR -C \"$workdir\" -c output.mar $targetfiles"
+mar_command="$MAR"
+if [[ -n $MOZ_PRODUCT_VERSION ]]
+then
+ mar_command="$mar_command -V $MOZ_PRODUCT_VERSION"
+fi
+mar_command="$mar_command -C \"$workdir\" -c output.mar"
+eval "$mar_command $targetfiles"
mv -f "$workdir/output.mar" "$archive"
# cleanup
rm -fr "$workdir"
notice ""
notice "Finished"
notice ""