Make sure we filter only Images() (#85)

otherwise the methods might fails to parse strange irrelevant tags

Should fix: https://github.com/kairos-io/kairos/issues/2440

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
Dimitris Karakasilis
2024-04-12 09:37:53 +03:00
committed by GitHub
parent ce8a9394a7
commit 66ee3cb60f
2 changed files with 4 additions and 3 deletions

View File

@@ -51,6 +51,7 @@
"sha256-a057b02932f3959aac4083ffcddbe9f3df343b7d0cf26961a9132c9116480a60.sig",
"sha256-94870aae76d698da12affe26bd79dfb37484cdf78a60c8c05be004b9dae49549.att",
"leap-15.5-core-arm64-generic-v2.4.2-rc1",
"leap-15.5-standard-amd64-generic-master",
"sha256-c3114f3d722a8bde5a4e3ff678d8a36eeb03fb05c1d5dbb0387126cec17db591.sbom",
"sha256-e53bed40882b69aceab2990e95e882448a4eaf97b2d7d254fcfa5127c9885da7.sig",
"sha256-c3114f3d722a8bde5a4e3ff678d8a36eeb03fb05c1d5dbb0387126cec17db591.att",

View File

@@ -150,7 +150,7 @@ func (tl TagList) OtherAnyVersion() TagList {
}
// NewerAnyVersion returns tags with:
// - a kairos version than the given artifact's
// - a kairos version newer than the given artifact's
// - a kairos version same as the given artifacts but a software version higher
// than the current artifact's
//
@@ -158,9 +158,9 @@ func (tl TagList) OtherAnyVersion() TagList {
// (first encountered, because our tags have a "k3s1" in the end too)
func (tl TagList) NewerAnyVersion() TagList {
if tl.Artifact.SoftwareVersion != "" {
return tl.newerSomeVersions()
return tl.Images().newerSomeVersions()
} else {
return tl.newerVersions()
return tl.Images().newerVersions()
}
}