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) |