mirror of
https://github.com/logos-co/logos-package-manager.git
synced 2026-08-27 10:11:07 +00:00
versionGreaterOrEqual split on '.' and atoi()'d each component, so
"1.0.0-rc1" parsed as 1.0.0 and a pre-release compared EQUAL to its own
release. `install --skip-if-not-newer` therefore refused to upgrade a
1.0.0-rc1 to the real 1.0.0. It now delegates to the shared implementation
in logos-package (include/logos/semver.hpp); the lgpm_version_gte C ABI is
unchanged.
`install --dir` sorted the .lgx files by FILENAME, lexicographically. Since
installPluginFile() overwrites, the last install of a given package wins --
and "foo-1.10.0.lgx" sorts before "foo-1.9.0.lgx" ("1" < "9"), so the older
1.9.0 was installed last and clobbered the newer 1.10.0. Order by the
package's real (name, version) read from the archive instead, version
ascending, so the newest of each package lands last.
tests/test_version.cpp had ten cases and not one pre-release among them.
Adds coverage for the ordering this gate actually depends on.
Requires logos-package#30; flake.lock is pinned at that branch's head and
must be re-pinned to master once it merges.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>