[yocto] [auh][PATCH 06/21] upgradehelper.py: always do upgrade when recipes are specified

Alexander Kanavin alexander.kanavin at linux.intel.com
Thu Dec 21 08:27:14 PST 2017


From: Robert Yang <liezhi.yang at windriver.com>

For example, first run:
$ upgradehelper.py less -d 5
It did the upgrade

Second run:
$ upgradehelper.py less -d 5
DEBUG: Skipping upgrade of less: is in history and not 30 days passed

Let it always do the upgrade makes it easier to use when do upgrade locally.
It will still do the check when the recipe is all.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 upgradehelper.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/upgradehelper.py b/upgradehelper.py
index 2061bfb..3c40918 100755
--- a/upgradehelper.py
+++ b/upgradehelper.py
@@ -756,7 +756,10 @@ class UniverseUpdater(Updater):
 
         pkgs_list = []
         for pkg in self._parse_checkpkg_file(last_checkpkg_file):
-            if self._pkg_upgradable(pkg[0], pkg[1], pkg[2]):
+            # Always do the upgrade if recipes are specified
+            if self.recipes and pkg[0] in self.recipes:
+                pkgs_list.append(pkg)
+            elif self._pkg_upgradable(pkg[0], pkg[1], pkg[2]):
                 pkgs_list.append(pkg)
 
         return pkgs_list
-- 
2.15.1




More information about the yocto mailing list