serpent-os / moss

The safe, fast and sane package manager for Linux
https://serpentos.com
72 stars 10 forks source link

moss: Registry sort is invalid #69

Closed ikeycode closed 3 months ago

ikeycode commented 8 months ago

See: https://github.com/serpent-os/libmoss/blob/main/source/moss/deps/registry/item.d#L38

The sort order (as a multi sort) is actually plugin priority, then release. Note this ensures that highest plugin with matching provider name always wins as well as ensuring highest release within a set wins (to eliminate duplicates in a single provider)

ikeycode commented 8 months ago

There is a potentially related issue when doing install which might actually be installs fault for not hitting the right plugin, the sorting is inverse.

ikeycode commented 8 months ago

So the CLI suspicion was correct, we just need to ensure we're bulletproof with the multisort going forward to prevent any demons cropping up down the road!

tarkah commented 3 months ago

I think we can close this? We explicitly sort on plugin priority descending when querying the registry and I don't believe there's any known gap here.