Skip to content

bst show --order alpha splits up elements from junction #2041

@harrysarson

Description

@harrysarson

The ordering used by bst show --order alpha is based on the comparison operator of the Element class. This ordering is based on element name only which means that the junction an element comes from is ignored when searching elements. This means that elements from different junctions get mixed together in the bst show output which is confusing.

A better option might be to use _get_full_name as the sort key (either in the def __lt__ in Element or directly in the bst show code). I am not sure on the stability promises of buildstream and whether the ordering of alpha cannot change (if so could we consider adding a new ordering?).

References

Comparison operator of Element class:

def __lt__(self, other):
return self.name < other.name

Sorting in bst show:

if order == "alpha":
dependencies = sorted(dependencies)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions