Bug 1233577 - Fix wrong path to mach in printconfig calls for comm builds. r=rail
authoraleth <aleth@instantbird.org>
Sun, 20 Dec 2015 00:12:39 +0100
changeset 4614 30f63e792b59cf9916ac20b36e807ddd1ca73702
parent 4610 7bef77bbaff873a351f95d8707947a2381fccca5
child 4615 6d5e55dbf91af207cad3324d5a8225ca33cb2c3b
push id3868
push useraleth@instantbird.org
push dateSun, 20 Dec 2015 16:39:00 +0000
reviewersrail
bugs1233577
Bug 1233577 - Fix wrong path to mach in printconfig calls for comm builds. r=rail
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -1363,19 +1363,23 @@ class MercurialBuildFactory(MozillaBuild
             printconfig_env = self.env.copy()
             del printconfig_env['MOZ_OBJDIR']
             printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
             # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
             if self.platform.startswith('win'):
                 python = ['c:/mozilla-build/python27/python', '-u']
             else:
                 python = ['/tools/buildbot/bin/python']
+            if self.mozillaSrcDir:
+                machPath = '%(basedir)s/build/mozilla/mach'
+            else:
+                machPath = '%(basedir)s/build/mach'
             # we need abs paths because we are in a non relative workdir
             printconfig_base_command = python + [
-                WithProperties('%(basedir)s/build/mach'), 'python',
+                WithProperties(machPath, 'python',
                 WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
                 WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
             ]
 
             self.addStep(SetProperty(
                 command=printconfig_base_command + ['App', 'BuildID'],
                 property='buildid',
                 workdir=printconfig_workdir,
@@ -1655,19 +1659,23 @@ class MercurialBuildFactory(MozillaBuild
         printconfig_env = self.env.copy()
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
         else:
             python = ['/tools/buildbot/bin/python']
+        if self.mozillaSrcDir:
+            machPath = '%(basedir)s/build/mozilla/mach'
+        else:
+            machPath = '%(basedir)s/build/mach'
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
-            WithProperties('%(basedir)s/build/mach'), 'python',
+            WithProperties(machPath), 'python',
             WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
             WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
         ]
         self.addStep(SetProperty(
             command=printconfig_base_command + ['App', 'BuildID'],
             property='buildid',
             workdir=printconfig_workdir,
             env=printconfig_env,
@@ -2160,19 +2168,23 @@ class NightlyBuildFactory(MercurialBuild
         printconfig_env = self.env.copy()
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
         else:
             python = ['/tools/buildbot/bin/python']
+        if self.mozillaSrcDir:
+            machPath = '%(basedir)s/build/mozilla/mach'
+        else:
+            machPath = '%(basedir)s/build/mach'
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
-            WithProperties('%(basedir)s/build/mach'), 'python',
+            WithProperties(machPath), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '/%(previous_inipath)s')
         ]
         self.addStep(SetProperty(
             name='set_previous_buildid',
             description=['set', 'previous', 'buildid'],
             doStepIf=self.previousMarExists,
@@ -3554,19 +3566,23 @@ class NightlyRepackFactory(BaseRepackFac
         printconfig_env = self.env.copy()
         del printconfig_env['MOZ_OBJDIR']
         printconfig_workdir = WithProperties('%(basedir)s/build/' + self.objdir)
         # hax https://bugzilla.mozilla.org/show_bug.cgi?id=1232466#c10
         if self.platform.startswith('win'):
             python = ['c:/mozilla-build/python27/python', '-u']
         else:
             python = ['/tools/buildbot/bin/python']
+        if self.mozillaSrcDir:
+            machPath = '%(basedir)s/build/mozilla/mach'
+        else:
+            machPath = '%(basedir)s/build/mach'
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
-            WithProperties('%(basedir)s/build/mach'), 'python',
+            WithProperties(machPath), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '%(inipath)s')
         ]
         self.addStep(SetProperty(
             command=printconfig_base_command + ['App', 'BuildID'],
             name='get_build_id',
             workdir=printconfig_workdir,