Bug 1231174 - Thunderbird 43.0b1 repacks failing on mac. r=rail
authorPhilipp Kewisch <mozilla@kewis.ch>
Fri, 18 Dec 2015 11:43:46 -0500
changeset 4610 7bef77bbaff873a351f95d8707947a2381fccca5
parent 4605 2293d99fd1fc26293047adb77d38a14a5e8e3c4e
child 4611 98e9120ade5407ce471edc9eee00accfd5983c15
child 4614 30f63e792b59cf9916ac20b36e807ddd1ca73702
push id3864
push userclokep@gmail.com
push dateFri, 18 Dec 2015 16:46:26 +0000
reviewersrail
bugs1231174
Bug 1231174 - Thunderbird 43.0b1 repacks failing on mac. r=rail
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -3251,16 +3251,23 @@ class BaseRepackFactory(MozillaBuildFact
                      workdir='%s/%s/locales' % (self.absMozillaObjDir, self.appName),
                      haltOnFailure=True,
                      mock=self.use_mock,
                      target=self.mock_target,
                      ))
         prettyEnv = self.env.copy()
         prettyEnv['MOZ_PKG_PRETTYNAMES'] = '1'
         prettyEnv['ZIP_IN'] = WithProperties('%(zip_in)s')
+
+        if self.productName == 'thunderbird' and self.platform.startswith('macosx'):
+            # This is a hack to get Thunderbird mac repacks working again and
+            # it should likely be checked if this code also works with all
+            # products. See bug 1231174 for more details.
+            prettyEnv.update({'MOZ_CURRENT_PROJECT': os.path.basename(self.objdir)})
+
         if self.platform.startswith('win'):
             self.addStep(MockProperty(
                          command=self.makeCmd + ['--no-print-directory',
                                                  'echo-variable-WIN32_INSTALLER_IN'],
                          property='win32_installer_in',
                          env=self.env,
                          workdir='%s/%s/locales' % (self.absMozillaObjDir, self.appName),
                          haltOnFailure=True,
@@ -3509,23 +3516,31 @@ class NightlyRepackFactory(BaseRepackFac
 
     # The parent class gets us most of the way there, we just need to add the
     # locale.
     def getCompleteMarPatternMatch(self):
         return '.%(locale)s.' + NightlyBuildFactory.getCompleteMarPatternMatch(self)
 
     def doRepack(self):
         self.downloadMarTools()
+
+        installersEnv = self.env.copy()
+        if self.productName == 'thunderbird' and self.platform.startswith('macosx'):
+            # This is a hack to get Thunderbird mac repacks working again and
+            # it should likely be checked if this code also works with all
+            # products. See bug 1231174 for details.
+            installersEnv.update({'MOZ_CURRENT_PROJECT': os.path.basename(self.objdir)})
+
         self.addStep(MockCommand(
                      name='repack_installers',
                      description=['repack', 'installers'],
                      command=self.makeCmd + [WithProperties('installers-%(locale)s'),
                                              WithProperties('LOCALE_MERGEDIR=%(basedir)s/' +
                                                             "%s/merged" % self.baseWorkDir)],
-                     env=self.env,
+                     env=installersEnv,
                      haltOnFailure=True,
                      workdir='%s/%s/locales' % (self.absObjDir, self.appName),
                      mock=self.use_mock,
                      target=self.mock_target,
                      ))
         self.addStep(FindFile(
             name='find_inipath',
             filename='application.ini',