Bug 723138 - Language packs should work for all releases of a branch, maxVersion should use * for compatibility ranges. r=Callek,a=Standard8
authorMark Banner <bugzilla@standard8.plus.com>
Mon, 16 Apr 2012 09:09:17 +0100
changeset 10728 b1002bdd09b6ff65ba2d76649ad523f121f06cd1
parent 10727 879e8d044e364396b63af59b3cdc4252fb2ae29a
child 10729 b0b116bdec07ff5e7931e9c03d7573d611982e85
push id447
push userbugzilla@standard8.plus.com
push dateMon, 16 Apr 2012 21:16:50 +0000
treeherdercomm-beta@b0b116bdec07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek, Standard8
bugs723138
Bug 723138 - Language packs should work for all releases of a branch, maxVersion should use * for compatibility ranges. r=Callek,a=Standard8
calendar/locales/generic/install.rdf
config/autoconf.mk.in
configure.in
mail/app/profile/extensions/Makefile.in
mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/install.rdf.in
mail/locales/generic/install.rdf
suite/locales/generic/install.rdf
--- a/calendar/locales/generic/install.rdf
+++ b/calendar/locales/generic/install.rdf
@@ -50,14 +50,14 @@
 #ifdef MOZ_LANGPACK_CONTRIBUTORS
     @MOZ_LANGPACK_CONTRIBUTORS@
 #endif
 
     <em:targetApplication>
       <Description>
         <em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
-        <em:maxVersion>@MOZ_APP_VERSION@</em:maxVersion>
+        <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
   </Description>
 </RDF>
  
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -48,16 +48,17 @@ MOZILLA_VERSION = @MOZILLA_VERSION@
 THUNDERBIRD_VERSION	= @THUNDERBIRD_VERSION@
 SUNBIRD_VERSION = @SUNBIRD_VERSION@
 SEAMONKEY_VERSION	= @SEAMONKEY_VERSION@
 
 MOZ_BUILD_APP = @MOZ_BUILD_APP@
 MOZ_APP_NAME	= @MOZ_APP_NAME@
 MOZ_APP_DISPLAYNAME = @MOZ_APP_DISPLAYNAME@
 MOZ_APP_VERSION = @MOZ_APP_VERSION@
+MOZ_APP_MAXVERSION = @MOZ_APP_MAXVERSION@
 MOZ_MACBUNDLE_NAME= @MOZ_MACBUNDLE_NAME@
 
 MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@
 
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 bindir		= @bindir@
 includedir	= @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
--- a/configure.in
+++ b/configure.in
@@ -6866,19 +6866,34 @@ fi
 
 if test "$MOZ_DEBUG"; then
   MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}Debug.app
 else
   MOZ_MACBUNDLE_NAME=${MOZ_MACBUNDLE_NAME}.app
 fi
 AC_SUBST(MOZ_MACBUNDLE_NAME)
 
+# For extensions and langpacks, we require a max version that is compatible
+# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
+# 10.0a1 and 10.0a2 aren't affected
+# 10.0 becomes 10.0.*
+# 10.0.1 becomes 10.0.*
+IS_ALPHA=`echo $MOZ_APP_VERSION | grep a`
+if test -z "$IS_ALPHA"; then
+  changequote(,)
+  MOZ_APP_MAXVERSION=`echo $MOZ_APP_VERSION | sed "s|\(^[0-9]*.[0-9]*\).*|\1|"`.*
+  changequote([,])
+else
+  MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
+fi
+
 AC_SUBST(MOZ_APP_NAME)
 AC_SUBST(MOZ_APP_DISPLAYNAME)
 AC_SUBST(MOZ_APP_VERSION)
+AC_SUBST(MOZ_APP_MAXVERSION)
 AC_SUBST(FIREFOX_VERSION)
 AC_SUBST(THUNDERBIRD_VERSION)
 AC_SUBST(SUNBIRD_VERSION)
 AC_SUBST(SEAMONKEY_VERSION)
 
 AC_SUBST(MOZ_PKG_SPECIAL)
 
 AC_SUBST(MAIL_PKG_SHARED)
--- a/mail/app/profile/extensions/Makefile.in
+++ b/mail/app/profile/extensions/Makefile.in
@@ -52,17 +52,20 @@ EXTENSIONS = \
   tbtestpilot@labs.mozilla.com \
   $(NULL)
 
 # We are in release mode, we don't want to ship the debug file.
 ifndef MOZ_DEBUG
 EXTRA_ARGS = -x content/debug.html
 endif
 
-DEFINES += -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION)
+DEFINES += \
+  -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
+  -DMOZ_APP_MAXVERSION=$(MOZ_APP_MAXVERSION) \
+  $(NULL)
 
 define _INSTALL_EXTENSION
 $(NSINSTALL) -D $(dir) && \
   $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/$(dir)/install.rdf.in > $(dir)/install.rdf && \
   cd $(dir) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi install.rdf && \
   cd $(call core_abspath,$(srcdir)/$(dir)) && \
   $(ZIP) -r9XD $(DISTROEXT)/$(dir).xpi * -x install.rdf.in $(EXTRA_ARGS)
--- a/mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/install.rdf.in
+++ b/mail/app/profile/extensions/tbtestpilot@labs.mozilla.com/install.rdf.in
@@ -9,18 +9,18 @@
     <em:version>1.3.8</em:version>
     <em:type>2</em:type>
 
     <!-- Target Application this extension can install into, 
          with minimum and maximum supported versions. --> 
     <em:targetApplication>
       <Description>
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <!-- Thunderbird -->
-        <em:minVersion>@THUNDERBIRD_VERSION@</em:minVersion>
-        <em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
+        <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
+        <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
    
     <!-- Front End MetaData -->
     <em:name>Test Pilot for Thunderbird</em:name>
     <em:description>Help make Thunderbird better by running user studies.</em:description>
     <em:creator>Mozilla Corporation</em:creator>
     <em:homepageURL>http://testpilot.mozillalabs.com/</em:homepageURL>
--- a/mail/locales/generic/install.rdf
+++ b/mail/locales/generic/install.rdf
@@ -49,13 +49,13 @@
                em:creator="@MOZ_LANGPACK_CREATOR@">
 #ifdef MOZ_LANGPACK_CONTRIBUTORS
     @MOZ_LANGPACK_CONTRIBUTORS@
 #endif
     <em:targetApplication>
       <Description>
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
-        <em:maxVersion>@MOZ_APP_VERSION@</em:maxVersion>
+        <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
   </Description>
 </RDF>
--- a/suite/locales/generic/install.rdf
+++ b/suite/locales/generic/install.rdf
@@ -50,13 +50,13 @@
 #ifdef MOZ_LANGPACK_CONTRIBUTORS
     @MOZ_LANGPACK_CONTRIBUTORS@
 #endif
 
     <em:targetApplication>
       <Description>
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
         <em:minVersion>@MOZ_APP_VERSION@</em:minVersion>
-        <em:maxVersion>@MOZ_APP_VERSION@</em:maxVersion>
+        <em:maxVersion>@MOZ_APP_MAXVERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
   </Description>
 </RDF>