From ce96cdff39166494c73c0345b9cdedeb157f9039 Mon Sep 17 00:00:00 2001 From: Meteor Date: Wed, 14 May 2025 09:27:33 +0000 Subject: [PATCH 1/3] fix: skip check when clib version keeps same --- internal/actions/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/actions/actions.go b/internal/actions/actions.go index de8ffd7..a999930 100644 --- a/internal/actions/actions.go +++ b/internal/actions/actions.go @@ -143,7 +143,7 @@ func checkLegacyVersion(ver *versions.Versions, cfg config.LLPkgConfig, mappedVe latestVersion := vers[0] - isLatest := semver.Compare(currentVersion, latestVersion) > 0 + isLatest := semver.Compare(currentVersion, latestVersion) >= 0 // fast-path: we're the latest version if isLatest { // case1: we're the latest version, but mapped version is not latest, invalid. From 2c9d2ba9757d4758854250944ce90062562e6c05 Mon Sep 17 00:00:00 2001 From: Meteor Date: Wed, 14 May 2025 09:44:52 +0000 Subject: [PATCH 2/3] fix: ci --- upstream/installer/conan/conan_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/upstream/installer/conan/conan_test.go b/upstream/installer/conan/conan_test.go index 409e551..5d9395e 100644 --- a/upstream/installer/conan/conan_test.go +++ b/upstream/installer/conan/conan_test.go @@ -21,7 +21,7 @@ func (vs packageSort) Len() int { return len(vs) } func (vs packageSort) Swap(i, j int) { vs[i], vs[j] = vs[j], vs[i] } func (vs packageSort) Less(i, j int) bool { - return vs[i].Version < vs[j].Version + return vs[i].Name < vs[j].Name } func TestConanCJSON(t *testing.T) { @@ -166,18 +166,18 @@ func TestConanDependency(t *testing.T) { Version: "3.2.6", } expectedDeps := []upstream.Package{ - {"libusb", "1.0.26"}, {"dbus", "1.15.8"}, - {"libiconv", "1.17"}, + {"expat", "2.7.1"}, {"libalsa", "1.2.12"}, - {"wayland", "1.22.0"}, - {"zlib", "1.3.1"}, - {"xkbcommon", "1.6.0"}, + {"libffi", "3.4.4"}, + {"libiconv", "1.17"}, {"libsndio", "1.9.0"}, - {"pulseaudio", "17.0"}, + {"libusb", "1.0.26"}, {"libxml2", "2.13.6"}, - {"expat", "2.7.1"}, - {"libffi", "3.4.4"}, + {"pulseaudio", "17.0"}, + {"wayland", "1.22.0"}, + {"xkbcommon", "1.6.0"}, + {"zlib", "1.3.1"}, } testDependency(t, map[string]string{}, pkg, expectedDeps) }) @@ -208,8 +208,8 @@ func TestConanDependency(t *testing.T) { Version: "1.1.42", } expectedDeps := []upstream.Package{ - {"zlib", "1.3.1"}, {"libxml2", "2.13.6"}, + {"zlib", "1.3.1"}, } testDependency(t, map[string]string{ "options": `libxml2/*:iconv=False`, @@ -223,8 +223,8 @@ func TestConanDependency(t *testing.T) { } expectedDeps := []upstream.Package{ {"libiconv", "1.17"}, - {"zlib", "1.3.1"}, {"libxml2", "2.13.6"}, + {"zlib", "1.3.1"}, } testDependency(t, map[string]string{}, pkg, expectedDeps) }) From 005338e472d0cf693736851be9c10547a513a913 Mon Sep 17 00:00:00 2001 From: Meteor Date: Wed, 14 May 2025 09:50:50 +0000 Subject: [PATCH 3/3] fix: skip check version fro deps --- upstream/installer/conan/conan_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/upstream/installer/conan/conan_test.go b/upstream/installer/conan/conan_test.go index 5d9395e..8a97579 100644 --- a/upstream/installer/conan/conan_test.go +++ b/upstream/installer/conan/conan_test.go @@ -141,8 +141,11 @@ func testDependency(t *testing.T, config map[string]string, pkg upstream.Package } sort.Sort(packageSort(ver)) - if !reflect.DeepEqual(ver, expectedDeps) { - t.Errorf("unexpected dependency for sdl: want %v got %v", expectedDeps, ver) + for i, expectedPkg := range expectedDeps { + // skip checking version of deps, because they may be upgraded + if expectedPkg.Name != ver[i].Name { + t.Errorf("unexpected dependency for sdl: want %v got %v", expectedDeps, ver) + } } }