mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
bd18497110
commit
3d98aafc43
@@ -654,18 +654,28 @@ def latest_version(args, config, basepath, workspace):
|
||||
return 0
|
||||
|
||||
def check_upgrade_status(args, config, basepath, workspace):
|
||||
def _print_status(recipe):
|
||||
print("{:25} {:15} {:15} {} {} {}".format( recipe['pn'],
|
||||
recipe['cur_ver'],
|
||||
recipe['status'] if recipe['status'] != 'UPDATE' else (recipe['next_ver'] if not recipe['next_ver'].endswith("new-commits-available") else "new commits"),
|
||||
recipe['maintainer'],
|
||||
recipe['revision'] if recipe['revision'] != 'N/A' else "",
|
||||
"cannot be updated due to: %s" %(recipe['no_upgrade_reason']) if recipe['no_upgrade_reason'] else ""))
|
||||
if not args.recipe:
|
||||
logger.info("Checking the upstream status for all recipes may take a few minutes")
|
||||
results = oe.recipeutils.get_recipe_upgrade_status(args.recipe)
|
||||
for result in results:
|
||||
# pn, update_status, current, latest, maintainer, latest_commit, no_update_reason
|
||||
if args.all or result['status'] != 'MATCH':
|
||||
print("{:25} {:15} {:15} {} {} {}".format( result['pn'],
|
||||
result['cur_ver'],
|
||||
result['status'] if result['status'] != 'UPDATE' else (result['next_ver'] if not result['next_ver'].endswith("new-commits-available") else "new commits"),
|
||||
result['maintainer'],
|
||||
result['revision'] if result['revision'] != 'N/A' else "",
|
||||
"cannot be updated due to: %s" %(result['no_upgrade_reason']) if result['no_upgrade_reason'] else ""))
|
||||
for recipegroup in results:
|
||||
upgrades = [r for r in recipegroup if r['status'] != 'MATCH']
|
||||
currents = [r for r in recipegroup if r['status'] == 'MATCH']
|
||||
if len(upgrades) > 1:
|
||||
print("These recipes need to be upgraded together {")
|
||||
for r in upgrades:
|
||||
_print_status(r)
|
||||
if len(upgrades) > 1:
|
||||
print("}")
|
||||
for r in currents:
|
||||
if args.all:
|
||||
_print_status(r)
|
||||
|
||||
def register_commands(subparsers, context):
|
||||
"""Register devtool subcommands from this plugin"""
|
||||
|
||||
Reference in New Issue
Block a user