diff --git a/depchase b/depchase index 9b4eab1..c8a686c 100755 --- a/depchase +++ b/depchase @@ -479,17 +479,21 @@ def print_reldeps(ctx, pkg): sel = pool.select(pkg, solv.Selection.SELECTION_NAME) assert not sel.isempty(), "Package can't be found" found = sel.solvables() - assert len(found) == 1, "More matching solvables were found, {}".format(found) - s = found[0] reldep2str = {solv.SOLVABLE_REQUIRES: "requires", solv.SOLVABLE_RECOMMENDS: "recommends", solv.SOLVABLE_SUGGESTS: "suggests", solv.SOLVABLE_SUPPLEMENTS: "supplements", solv.SOLVABLE_ENHANCES: "enhances"} - for reltype, relstr in reldep2str.items(): - for dep in s.lookup_deparray(reltype): - print("{}: {}".format(relstr, dep)) + + for i, s in enumerate(found): + if len(found) > 1: + if (i > 0): + print() + print("Solution #{}:".format(i + 1)) + for reltype, relstr in reldep2str.items(): + for dep in s.lookup_deparray(reltype): + print("{}: {}".format(relstr, dep)) if __name__ == "__main__": cli(obj={})