All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: yocto@yoctoproject.org
Subject: [[PATCH][AUH] 2/3] upgradehelper.py: Move build of gcc runtime after discover packages
Date: Mon, 20 Jun 2016 16:27:49 -0500	[thread overview]
Message-ID: <1466458070-20099-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1466458070-20099-1-git-send-email-anibal.limon@linux.intel.com>

If no packages are found to upgrade, it didn't make sense to build
gcc runtime before is only a waste of time.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
 upgradehelper.py | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index 499c539..386cbcc 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -500,20 +500,6 @@ class Updater(object):
         return pkgs_to_upgrade_ordered
 
     def run(self, package_list=None):
-        I(" Building gcc runtimes ...")
-        for machine in self.opts['machines']:
-            I("  building gcc runtime for %s" % machine)
-            try:
-                self.bb.complete("gcc-runtime", machine)
-            except Exception as e:
-                E(" Can't build gcc-runtime for %s." % machine)
-
-                if isinstance(e, Error):
-                    E(e.stdout)
-                else:
-                    import traceback
-                    traceback.print_exc(file=sys.stdout)
-
         pkgs_to_upgrade = self._order_pkgs_to_upgrade(
                 self._get_packages_to_upgrade(package_list))
         total_pkgs = len(pkgs_to_upgrade)
@@ -532,6 +518,21 @@ class Updater(object):
             pkgs_ctx[p]['base_dir'] = self.uh_recipes_all_dir
         I(" ############################################################")
 
+        if pkgs_to_upgrade:
+            I(" Building gcc runtimes ...")
+            for machine in self.opts['machines']:
+                I("  building gcc runtime for %s" % machine)
+                try:
+                    self.bb.complete("gcc-runtime", machine)
+                except Exception as e:
+                    E(" Can't build gcc-runtime for %s." % machine)
+
+                    if isinstance(e, Error):
+                        E(e.stdout)
+                    else:
+                        import traceback
+                        traceback.print_exc(file=sys.stdout)
+
         succeeded_pkgs_ctx = []
         failed_pkgs_ctx = []
         attempted_pkgs = 0
-- 
2.1.4



  reply	other threads:[~2016-06-20 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 21:27 [[PATCH][AUH] 1/3] Small fixes to use with Python3 Aníbal Limón
2016-06-20 21:27 ` Aníbal Limón [this message]
2016-06-20 21:27 ` [[PATCH][AUH] 3/3] upgradehelper.py: Disable _order_pkgs_to_upgrade functionality Aníbal Limón
2016-06-21 14:08   ` Leonardo Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466458070-20099-2-git-send-email-anibal.limon@linux.intel.com \
    --to=anibal.limon@linux.intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.