From 26a9f29c6fb9775562aad4769a2a1ce55f0d1de0 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Tue, 18 Mar 2014 14:53:43 +0100 Subject: [PATCH] action #1934 Change check_repo (cr) command to attend ordered IDs --- osc-check_repo.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osc-check_repo.py b/osc-check_repo.py index 37f81b1a..f7323cd7 100644 --- a/osc-check_repo.py +++ b/osc-check_repo.py @@ -1078,11 +1078,16 @@ def do_check_repo(self, subcmd, opts, *args): for id_ in ids: packs.extend(self._check_repo_fetch_request(id_, opts)) + # Order the packs before grouping + packs = sorted(packs, key=lambda p: p.request, reverse=True) + groups = {} for p in packs: a = groups.get(p.group, []) a.append(p) groups[p.group] = a - for id_, reqs in groups.items(): + # Sort the groups, from high to low. This put first the stating + # projects also + for id_, reqs in sorted(groups.items(), reverse=True): self._check_repo_group(id_, reqs, opts)