From 7ee37486990d36a710f1573845f21deab45ba2b6 Mon Sep 17 00:00:00 2001 From: Petr Stodulka Date: Tue, 14 May 2024 12:03:30 +0200 Subject: [PATCH] dnf-plugin-data: sort intput lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously to_install, to_remove, to_upgrade, ... lists have been unsorted. Having these lists sorted is helpful when checking these tasks manually (e.g. during investigations). Co-authored-by: Michal Hečko --- repos/system_upgrade/common/libraries/dnfplugin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py index e59168ef58..6f056a3338 100644 --- a/repos/system_upgrade/common/libraries/dnfplugin.py +++ b/repos/system_upgrade/common/libraries/dnfplugin.py @@ -85,11 +85,11 @@ def build_plugin_data(target_repoids, debug, test, tasks, on_aws): # get list of repo IDs of target repositories that should be used for upgrade data = { 'pkgs_info': { - 'local_rpms': [os.path.join('/installroot', pkg.lstrip('/')) for pkg in tasks.local_rpms], - 'to_install': tasks.to_install, - 'to_remove': tasks.to_remove, - 'to_upgrade': tasks.to_upgrade, - 'modules_to_enable': ['{}:{}'.format(m.name, m.stream) for m in tasks.modules_to_enable], + 'local_rpms': sorted(os.path.join('/installroot', pkg.lstrip('/')) for pkg in tasks.local_rpms), + 'to_install': sorted(tasks.to_install), + 'to_remove': sorted(tasks.to_remove), + 'to_upgrade': sorted(tasks.to_upgrade), + 'modules_to_enable': sorted(['{}:{}'.format(m.name, m.stream) for m in tasks.modules_to_enable]), }, 'dnf_conf': { 'allow_erasing': True,