[yocto] [auh][PATCH 3/4] Handle upgrades for recipes with no maintainer

Paul Eggleton paul.eggleton at linux.intel.com
Fri Aug 15 02:48:43 PDT 2014


You still want to be able to use this tool manually even if there is no
maintainer defined for the recipe.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 upgradehelper.py | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index 44b394a..42ac110 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -165,9 +165,15 @@ class Updater(object):
         self.recipe_dir = os.path.dirname(self.env['FILE'])
 
     def _parse_checkpkg_line(self, line):
-        m = re.match("^([^ \t]*)[ \t]+([^ \t]*)[ \t]+([^ \t]*).*<(.*)@(.*)>[ \t]+.*", line)
-        if m is not None:
-            return (m.group(1), m.group(2), m.group(3), m.group(4) + "@" + m.group(5))
+        m = re.match("^([^ \t]*)[ \t]+([^ \t]*)[ \t]+([^ \t]*)[ \t]+.*", line)
+        if m:
+            res = (m.group(1), m.group(2), m.group(3))
+            m = re.search("<([^ \t]+@[^ \t]+)>", line)
+            if m:
+                maintainer = m.group(1)
+            else:
+                maintainer = None
+            return res + (maintainer,)
 
         return (None, None, None, None)
 
@@ -290,6 +296,8 @@ class Updater(object):
         pkgs_list = []
 
         with open(get_build_dir() + "/tmp/log/checkpkg.csv") as csv:
+            # Skip header line
+            next(csv)
             for line in csv:
                 (pn, cur_ver, next_ver, maintainer) = self._parse_checkpkg_line(line)
 
@@ -443,6 +451,10 @@ class UniverseUpdater(Updater, Email):
     # blacklisted: python, gcc, etc. Also, check the history if the recipe
     # hasn't already been tried
     def pkg_upgradable(self, pn, next_ver, maintainer):
+        if not maintainer:
+            D("Skipping upgrade of %s: no maintainer" % pn)
+            return False
+
         if "blacklist" in settings:
             for p in settings["blacklist"].split():
                 if p == pn:
-- 
1.9.3




More information about the yocto mailing list