Bug 446527 - major update not offered when some language packs are installed. r=philringnalda
authorRobert Strong <robert.bugzilla@gmail.com>
Sun, 17 Aug 2008 14:13:59 -0700
changeset 125 4665f977d95b80be80d2dec85d162cfaa68d8a60
parent 124 5773e859a5a6cae2861d3c19c4f6d157ea53c658
child 126 8a3e54a9ac152e90def581b15f52509adf00fa24
push idunknown
push userunknown
push dateunknown
reviewersphilringnalda
bugs446527
Bug 446527 - major update not offered when some language packs are installed. r=philringnalda
mail/locales/Makefile.in
mail/locales/updater_append.ini
suite/locales/Makefile.in
suite/locales/updater_append.ini
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -115,17 +115,17 @@ libs-%:
 	@$(MAKE) -C ../../mozilla/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 ifdef MOZ_BRANDING_DIRECTORY
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 else
 	@$(MAKE) -C $(DEPTH)/mail/branding/nightly/locales AB_CD=$* XPI_NAME=locale-$*
 endif
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
 MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
 MOZ_PKG_MAC_RSRC=$(_ABS_DIST)/branding/license.r
 # Disabled for official branding until we have updated images
 ifndef MOZ_BRANDING_DIRECTORY
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
@@ -165,17 +165,17 @@ endif
 	    $(topsrcdir)/mail/installer/windows/app.tag \
 	    app.7z > $(WIN32_INSTALLER_OUT)
 	chmod 0755 $(WIN32_INSTALLER_OUT)
 
 repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe
 repackage-win32-installer-%: $(WIN32_INSTALLER_IN)
 	@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
 else
 STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)
 endif
 
 repackage-zip: ZIP_OUT=$(_ABS_DIST)/$(PACKAGE)
 repackage-zip: UNPACKAGE=$(ZIP_IN)
 repackage-zip: $(ZIP_IN)
@@ -196,17 +196,17 @@ ifeq (WINNT,$(OS_ARCH))
 	$(RM) -r $(STAGEDIST)/uninstall
 	$(NSINSTALL) -D $(STAGEDIST)/uninstall
 	cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
 endif
 	$(RM) -r $(DIST)/xpi-stage/locale-$(AB_CD)/chrome/$(AB_CD)
 	cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
 	  tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
 ifneq (en,$(AB))
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 	mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
 endif
 endif
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_PACKAGE)
 	mv -f $(DIST)/l10n-stage/$(PACKAGE) $(DIST)
 
 repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
@@ -241,14 +241,16 @@ installers-%:
 ifeq (WINNT,$(OS_ARCH))
 	@$(MAKE) repackage-win32-installer-$*
 endif
 	@$(MAKE) repackage-zip-$*
 
 ifdef MOZ_UPDATER
 libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
 ifeq ($(OS_ARCH),WINNT)
-	cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
+	cat $< $(srcdir)/updater_append.ini $(srcdir)/../installer/windows/nsis/updater_append.ini | \
+	  sed -e "s/%AB_CD%/$(AB_CD)/" | \
 	  iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) > $(FINAL_TARGET)/updater.ini
 else
-	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
+	cat $< $(srcdir)/updater_append.ini | \
+	  sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
 endif
 endif
new file mode 100644
--- /dev/null
+++ b/mail/locales/updater_append.ini
@@ -0,0 +1,5 @@
+
+; IMPORTANT: This file should always start with a newline in case a locale
+; provided updater.ini does not end with a newline.
+[Installation]
+Locale=%AB_CD%
--- a/suite/locales/Makefile.in
+++ b/suite/locales/Makefile.in
@@ -69,17 +69,17 @@ DEFINES += \
 ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
 DEFINES += -DEXTENSION_PREF
 endif
 
 PREF_JS_EXPORTS = $(LOCALE_SRCDIR)/suite-l10n.js
 
 include $(topsrcdir)/config/rules.mk
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 README_FILES = \
 	installer/mac/README.txt \
 	$(NULL)
 else
 ifeq ($(OS_ARCH),OS2)
 README_FILES = \
 	installer/os2/README.txt \
 	$(NULL)
@@ -186,17 +186,17 @@ repackage-win32-installer: $(WIN32_INSTA
 	    $(topsrcdir)/suite/installer/windows/app.tag \
 	    app.7z > $(WIN32_INSTALLER_OUT)
 	chmod 0755 $(WIN32_INSTALLER_OUT)
 
 repackage-win32-installer-%: WIN32_INSTALLER_IN=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe
 repackage-win32-installer-%: $(WIN32_INSTALLER_IN)
 	@$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
 
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
 # leave out $(STAGEPATH) as we never have a universal/ subdir here
 PKG_DMG_SOURCE = $(MOZ_PKG_APPNAME)
 else
 STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)
 endif
 
 repackage-zip: ZIP_OUT=$(_ABS_DIST)/$(PACKAGE)
@@ -221,17 +221,17 @@ ifeq (WINNT,$(OS_ARCH))
 	cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
 endif
 	$(RM) -r $(DIST)/xpi-stage/locale-$(AB_CD)/chrome/$(AB_CD)
 	cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
 	  tar $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
 	$(MAKE) -C ../../mozilla/extensions/irc/locales repackage-zip-$(AB_CD) STAGEDIST=$(STAGEDIST)
 	$(MAKE) -C ../../mozilla/extensions/venkman/locales repackage-zip-$(AB_CD) STAGEDIST=$(STAGEDIST)
 ifneq (en,$(AB))
-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
 	mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
 endif
 endif
 	cd $(DIST)/l10n-stage; \
 	  $(MAKE_PACKAGE)
 	mv -f $(DIST)/l10n-stage/$(PACKAGE) $(DIST)
 
 repackage-zip-%: ZIP_IN=$(_ABS_DIST)/$(PACKAGE)
@@ -264,13 +264,16 @@ installers-%:
 ifeq (WINNT,$(OS_ARCH))
 	@$(MAKE) repackage-win32-installer-$*
 endif
 	@$(MAKE) repackage-zip-$*
 
 ifdef MOZ_UPDATER
 libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
 ifeq ($(OS_ARCH),WINNT)
-	iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) $< > $(FINAL_TARGET)/updater.ini
+	cat $< $(srcdir)/updater_append.ini $(srcdir)/../installer/windows/nsis/updater_append.ini | \
+	  sed -e "s/%AB_CD%/$(AB_CD)/" | \
+	  iconv -f UTF-8 -t $(WIN_INSTALLER_CHARSET) > $(FINAL_TARGET)/updater.ini
 else
-	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
+	cat $< $(srcdir)/updater_append.ini | \
+	  sed -e "s/%AB_CD%/$(AB_CD)/" > $(FINAL_TARGET)/updater.ini
 endif
 endif
new file mode 100644
--- /dev/null
+++ b/suite/locales/updater_append.ini
@@ -0,0 +1,5 @@
+
+; IMPORTANT: This file should always start with a newline in case a locale
+; provided updater.ini does not end with a newline.
+[Installation]
+Locale=%AB_CD%