diff options
author | Alexander Kanavin <alex@linutronix.de> | 2024-07-17 20:22:15 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-07-22 16:53:06 +0100 |
commit | 3d98aafc43bf6d14aac997137348fe503efed04e (patch) | |
tree | 99c4454f140b999447c3e6325bca7eca5030e346 /scripts | |
parent | bd18497110796c5d86cef202dc37798478c84cd2 (diff) | |
download | poky-3d98aafc43bf6d14aac997137348fe503efed04e.tar.gz |
recipeutils/get_recipe_upgrade_status: group recipes when they need to be upgraded together
This will allow 'lockstep upgrades' of such recipes, improving success
rates in automated version updating process.
devtool check-upgrade-status now prints:
These recipes need to be upgraded together {
glib-2.0 2.80.2 2.80.4 Anuj Mittal <anuj.mittal@intel.com>
glib-2.0-initial 2.80.2 2.80.4 Anuj Mittal <anuj.mittal@intel.com>
}
These recipes need to be upgraded together {
util-linux 2.39.3 2.40.2 Chen Qi <Qi.Chen@windriver.com>
util-linux-libuuid 2.39.3 2.40.2 Chen Qi <Qi.Chen@windriver.com>
}
These recipes need to be upgraded together {
cmake 3.29.3 3.30.0 Unassigned <unassigned@yoctoproject.org>
cmake-native 3.29.3 3.30.0 Unassigned <unassigned@yoctoproject.org>
}
etc.
(From OE-Core rev: 7874aea5c62be3e8dbd19e04fce5389c5ed7aab6)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 10b4f8b5ee..4c268af3a7 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -654,18 +654,28 @@ def latest_version(args, config, basepath, workspace): | |||
654 | return 0 | 654 | return 0 |
655 | 655 | ||
656 | def check_upgrade_status(args, config, basepath, workspace): | 656 | def check_upgrade_status(args, config, basepath, workspace): |
657 | def _print_status(recipe): | ||
658 | print("{:25} {:15} {:15} {} {} {}".format( recipe['pn'], | ||
659 | recipe['cur_ver'], | ||
660 | recipe['status'] if recipe['status'] != 'UPDATE' else (recipe['next_ver'] if not recipe['next_ver'].endswith("new-commits-available") else "new commits"), | ||
661 | recipe['maintainer'], | ||
662 | recipe['revision'] if recipe['revision'] != 'N/A' else "", | ||
663 | "cannot be updated due to: %s" %(recipe['no_upgrade_reason']) if recipe['no_upgrade_reason'] else "")) | ||
657 | if not args.recipe: | 664 | if not args.recipe: |
658 | logger.info("Checking the upstream status for all recipes may take a few minutes") | 665 | logger.info("Checking the upstream status for all recipes may take a few minutes") |
659 | results = oe.recipeutils.get_recipe_upgrade_status(args.recipe) | 666 | results = oe.recipeutils.get_recipe_upgrade_status(args.recipe) |
660 | for result in results: | 667 | for recipegroup in results: |
661 | # pn, update_status, current, latest, maintainer, latest_commit, no_update_reason | 668 | upgrades = [r for r in recipegroup if r['status'] != 'MATCH'] |
662 | if args.all or result['status'] != 'MATCH': | 669 | currents = [r for r in recipegroup if r['status'] == 'MATCH'] |
663 | print("{:25} {:15} {:15} {} {} {}".format( result['pn'], | 670 | if len(upgrades) > 1: |
664 | result['cur_ver'], | 671 | print("These recipes need to be upgraded together {") |
665 | result['status'] if result['status'] != 'UPDATE' else (result['next_ver'] if not result['next_ver'].endswith("new-commits-available") else "new commits"), | 672 | for r in upgrades: |
666 | result['maintainer'], | 673 | _print_status(r) |
667 | result['revision'] if result['revision'] != 'N/A' else "", | 674 | if len(upgrades) > 1: |
668 | "cannot be updated due to: %s" %(result['no_upgrade_reason']) if result['no_upgrade_reason'] else "")) | 675 | print("}") |
676 | for r in currents: | ||
677 | if args.all: | ||
678 | _print_status(r) | ||
669 | 679 | ||
670 | def register_commands(subparsers, context): | 680 | def register_commands(subparsers, context): |
671 | """Register devtool subcommands from this plugin""" | 681 | """Register devtool subcommands from this plugin""" |