Bug 661910: Iterate over all component manifests when commenting out binary components during omnijar packing. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 11 Jun 2011 12:28:04 -0700
changeset 72611 8753de11b181b8cf318783591bd4936d37f22f2f
parent 72610 127eaaa80f8dd29df2cf7df924f8a3602d4b97bc
child 72612 cd6c4d5c4ff507750221df8ff1638d73b5751d6e
push id20746
push userkhuey@mozilla.com
push dateMon, 11 Jul 2011 22:32:53 +0000
treeherdermozilla-central@8753de11b181 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs661910
milestone8.0a1
first release with
nightly linux32
8753de11b181 / 8.0a1 / 20110712030758 / files
nightly linux64
8753de11b181 / 8.0a1 / 20110712030758 / files
nightly mac
8753de11b181 / 8.0a1 / 20110712030758 / files
nightly win32
8753de11b181 / 8.0a1 / 20110712030758 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 661910: Iterate over all component manifests when commenting out binary components during omnijar packing. r=khuey
toolkit/mozapps/installer/packager.mk
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -403,29 +403,33 @@ NON_OMNIJAR_FILES += \
   $(PREF_DIR)/channel-prefs.js \
   res/cursors/\* \
   res/MainMenu.nib/\* \
   $(NULL)
 
 PACK_OMNIJAR	= \
   rm -f omni.jar components/binary.manifest && \
   grep -h '^binary-component' components/*.manifest > binary.manifest ; \
-  sed -e 's/^binary-component/\#binary-component/' components/components.manifest > components.manifest && \
-  mv components.manifest components && \
-  zip -r9m omni.jar $(OMNIJAR_FILES) -x $(NON_OMNIJAR_FILES) && \
+  for m in components/*.manifest; do \
+    sed -e 's/^binary-component/\#binary-component/' $$m > tmp.manifest && \
+    mv tmp.manifest $$m; \
+  done; \
+  $(ZIP) -r9m omni.jar $(OMNIJAR_FILES) -x $(NON_OMNIJAR_FILES) && \
   $(GENERATE_CACHE) && \
   $(OPTIMIZE_JARS_CMD) --optimize $(JARLOG_DIR_AB_CD) ./ ./ && \
   mv binary.manifest components && \
   printf "manifest components/binary.manifest\n" > chrome.manifest
 UNPACK_OMNIJAR	= \
   $(OPTIMIZE_JARS_CMD) --deoptimize $(JARLOG_DIR_AB_CD) ./ ./ && \
-  unzip -o omni.jar && \
+  $(UNZIP) -o omni.jar && \
   rm -f components/binary.manifest && \
-  sed -e 's/^\#binary-component/binary-component/' components/components.manifest > components.manifest && \
-  mv components.manifest components
+  for m in components/*.manifest; do \
+    sed -e 's/^\#binary-component/binary-component/' $$m > tmp.manifest && \
+    mv tmp.manifest $$m; \
+  done
 
 MAKE_PACKAGE	= (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)) && \
 	              (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE)
 UNMAKE_PACKAGE	= $(INNER_UNMAKE_PACKAGE) && (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(UNPACK_OMNIJAR))
 else
 MAKE_PACKAGE	= (cd $(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(CREATE_PRECOMPLETE_CMD)) && $(INNER_MAKE_PACKAGE)
 UNMAKE_PACKAGE	= $(INNER_UNMAKE_PACKAGE)
 endif