summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-01-23 17:17:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-26 13:39:37 +0000
commit3bf20354725b460434ad8aee4f6a4e41ce683a49 (patch)
tree1d642b3db0c732db60dba87d5bfa8dc78a886572 /scripts/lib/devtool
parent411e2b7047b04edb9065f84d96cc7d14224c5032 (diff)
downloadpoky-3bf20354725b460434ad8aee4f6a4e41ce683a49.tar.gz
devtool: add a command to print an overall list of recipes that can be updated
A sample portion of the output: $ devtool check-upgrade-status ... NOTE: acpid 2.0.30 2.0.31 Ross Burton <ross.burton@intel.com> NOTE: u-boot-fw-utils 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot-tools 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: bind 9.11.5 9.13.5 Armin Kuster <akuster808@gmail.com> cannot be updated due to: 9.11 is LTS 2021 NOTE: iproute2 4.19.0 4.20.0 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: ofono 1.25 1.27 Ross Burton <ross.burton@intel.com> NOTE: wpa-supplicant 2.6 2.7 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: base-passwd 3.5.29 3.5.45 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to: Version 3.5.38 requires cdebconf for update-passwd utility NOTE: busybox 1.29.2 1.30.0 Andrej Valek <andrej.valek@siemens.com> NOTE: dbus-test 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: dbus 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: glib-2.0 2.58.0 2.58.3 Anuj Mittal <anuj.mittal@intel.com> NOTE: glib-networking 2.54.1 2.58.0 Anuj Mittal <anuj.mittal@intel.com> ... (From OE-Core rev: 02284423b6391c77da19912192fc607fedb05e67) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/upgrade.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 202007793b..42a4c0e4bf 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -600,6 +600,20 @@ def latest_version(args, config, basepath, workspace):
600 tinfoil.shutdown() 600 tinfoil.shutdown()
601 return 0 601 return 0
602 602
603def check_upgrade_status(args, config, basepath, workspace):
604 if not args.recipe:
605 logger.info("Checking the upstream status for all recipes may take a few minutes")
606 results = oe.recipeutils.get_recipe_upgrade_status(args.recipe)
607 for result in results:
608 # pn, update_status, current, latest, maintainer, latest_commit, no_update_reason
609 if result[1] != 'MATCH':
610 logger.info("{:25} {:15} {:15} {} {} {}".format( result[0],
611 result[2],
612 result[1] if result[1] != 'UPDATE' else (result[3] if not result[3].endswith("new-commits-available") else "new commits"),
613 result[4],
614 result[5] if result[5] != 'N/A' else "",
615 "cannot be updated due to: %s" %(result[6]) if result[6] else ""))
616
603def register_commands(subparsers, context): 617def register_commands(subparsers, context):
604 """Register devtool subcommands from this plugin""" 618 """Register devtool subcommands from this plugin"""
605 619
@@ -627,3 +641,9 @@ def register_commands(subparsers, context):
627 group='info') 641 group='info')
628 parser_latest_version.add_argument('recipename', help='Name of recipe to query (just name - no version, path or extension)') 642 parser_latest_version.add_argument('recipename', help='Name of recipe to query (just name - no version, path or extension)')
629 parser_latest_version.set_defaults(func=latest_version) 643 parser_latest_version.set_defaults(func=latest_version)
644
645 parser_check_upgrade_status = subparsers.add_parser('check-upgrade-status', help="Report upgradability for multiple (or all) recipes",
646 description="Prints a table of recipes together with versions currently provided by recipes, and latest upstream versions, when there is a later version available",
647 group='info')
648 parser_check_upgrade_status.add_argument('recipe', help='Name of the recipe to report (omit to report upgrade info for all recipes)', nargs='*')
649 parser_check_upgrade_status.set_defaults(func=check_upgrade_status)