From e2098963322bfd7b0dcc1ca34b484fa356aa5da7 Mon Sep 17 00:00:00 2001 From: germann_e Date: Wed, 23 Aug 2023 13:02:18 +0200 Subject: [PATCH] FIX: sort modules by 'stable', 'unstable', 'deprecated' --- pmodules_tools/db_diff/check.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pmodules_tools/db_diff/check.py b/pmodules_tools/db_diff/check.py index 080b89f8..727f4edf 100644 --- a/pmodules_tools/db_diff/check.py +++ b/pmodules_tools/db_diff/check.py @@ -102,7 +102,10 @@ def db_check_diff(current_pmodule_state, Pmodules_db_path, Pmodules_states): ) old_db = set(" ".join(i.split()) for i in old_pmodule_state.splitlines()) all_module_list = list(current_db) - all_module_list = sorted(all_module_list) + all_module_list_sorted = sorted([x for x in all_module_list if 'stable' in x]) + all_module_list_sorted.append(sorted([x for x in all_module_list if 'unstable' in x])) + all_module_list_sorted.append(sorted([x for x in all_module_list if 'deprecated' in x])) + all_module_list = all_module_list_sorted # We have to check the differences between the pmodule states. if compare_states_sha(current_pmodule_state, old_pmodule_state, current_sha):