Backed out changeset a59090148268 (bug 1204822) for B2G ICS build bustage
authorNigel Babu <nigelbabu@gmail.com>
Tue, 22 Sep 2015 09:58:11 +0530
changeset 263635 cadeefe3e92791a426c3e950b78e4a38a7093e9a
parent 263634 19e78c13da986e938cab9e3afc2833efee2d416d
child 263636 1056ac371c0468cde5600a7c5765dc170c5f77e5
push id65385
push usernigelbabu@gmail.com
push dateTue, 22 Sep 2015 04:28:34 +0000
treeherdermozilla-inbound@cadeefe3e927 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1204822
milestone44.0a1
backs outa59090148268ec88d4e74254a1a20f27af9e6ef6
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a59090148268 (bug 1204822) for B2G ICS build bustage
testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
testing/mozharness/scripts/b2g_build.py
--- a/testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildb2gbase.py
@@ -259,28 +259,16 @@ class B2GBuildBaseScript(BuildbotMixin, 
             self.run_command(['cat', conf_file])
             self.gecko_config = json.load(open(conf_file))
             return self.gecko_config
 
         # The file doesn't exist; let's try loading it remotely
         self.gecko_config = self.query_remote_gecko_config()
         return self.gecko_config
 
-    def symlink_gtk3(self):
-        dirs = self.query_abs_dirs()
-        gtk3_path = os.path.join(dirs['abs_work_dir'], 'gtk3')
-        gtk3_symlink_path = os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3')
-
-        if os.path.isdir(gtk3_path):
-            cmd = ["ln", "-s", gtk3_path, gtk3_symlink_path]
-            retval = self.run_command(cmd)
-            if retval != 0:
-                self.error("failed to create symlink")
-                self.return_code = 2
-
     def query_build_env(self):
         """Retrieves the environment for building"""
         dirs = self.query_abs_dirs()
         gecko_config = self.load_gecko_config()
         env = self.query_env()
         for k, v in gecko_config.get('env', {}).items():
             v = v.format(workdir=dirs['abs_work_dir'],
                          srcdir=os.path.abspath(dirs['gecko_src']))
@@ -292,23 +280,16 @@ class B2GBuildBaseScript(BuildbotMixin, 
             v = str(self.config['variant'])
             env['VARIANT'] = v
         if self.config.get('ccache'):
             env['CCACHE_BASEDIR'] = dirs['work_dir']
         # If we get a buildid from buildbot, pass that in as MOZ_BUILD_DATE
         if self.buildbot_config and 'buildid' in self.buildbot_config.get('properties', {}):
             env['MOZ_BUILD_DATE'] = self.buildbot_config['properties']['buildid']
 
-        self.symlink_gtk3()
-        env['LD_LIBRARY_PATH'] = os.environ.get('LD_LIBRARY_PATH')
-        if env['LD_LIBRARY_PATH'] is None:
-            env['LD_LIBRARY_PATH'] = os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3', 'usr', 'local', 'lib')
-        else:
-            env['LD_LIBRARY_PATH'] += ':%s' % os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3', 'usr', 'local', 'lib')
-
         return env
 
     def query_hgweb_url(self, repo, rev, filename=None):
         if filename:
             url = "{baseurl}/raw-file/{rev}/{filename}".format(
                 baseurl=repo,
                 rev=rev,
                 filename=filename)
--- a/testing/mozharness/scripts/b2g_build.py
+++ b/testing/mozharness/scripts/b2g_build.py
@@ -536,27 +536,45 @@ class B2GBuild(LocalesMixin, PurgeMixin,
             else:
                 # Ensure we always utilize the correct number of cores
                 # regardless of the configuration which may be set by repo
                 # config changes...
                 cmd.append('-j{0}'.format(multiprocessing.cpu_count()))
             cmd.append(target)
         return cmd
 
+    def symlink_gtk3(self):
+        dirs = self.query_abs_dirs()
+        gtk3_path = os.path.join(dirs['abs_work_dir'], 'gtk3')
+        gtk3_symlink_path = os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3')
+
+        if os.path.isdir(gtk3_path):
+            cmd = ["ln", "-s", gtk3_path, gtk3_symlink_path]
+            retval = self.run_command(cmd)
+            if retval != 0:
+                self.error("failed to create symlink")
+                self.return_code = 2
+
     def build(self):
         dirs = self.query_abs_dirs()
         gecko_config = self.load_gecko_config()
         build_targets = gecko_config.get('build_targets', [])
         build_targets.extend(self.config.get("build_targets", []))
         if not build_targets:
             cmds = [self.generate_build_command()]
         else:
             cmds = [self.generate_build_command(t) for t in build_targets]
 
+        self.symlink_gtk3()
         env = self.query_build_env()
+        env['LD_LIBRARY_PATH'] = os.environ.get('LD_LIBRARY_PATH')
+        if env['LD_LIBRARY_PATH'] is None:
+            env['LD_LIBRARY_PATH'] = os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3', 'usr', 'local', 'lib')
+        else:
+            env['LD_LIBRARY_PATH'] += ':%s' % os.path.join(dirs['abs_work_dir'], 'gecko', 'gtk3', 'usr', 'local', 'lib')
         if self.config.get('gaia_languages_file'):
             env['LOCALE_BASEDIR'] = dirs['gaia_l10n_base_dir']
             env['LOCALES_FILE'] = os.path.join(dirs['abs_work_dir'], 'gaia', self.config['gaia_languages_file'])
         if self.config.get('locales_file'):
             env['L10NBASEDIR'] = dirs['abs_l10n_dir']
             env['MOZ_CHROME_MULTILOCALE'] = " ".join(self.query_locales())
             if 'PATH' not in env:
                 env['PATH'] = os.environ.get('PATH')