Skip to content

Commit 10b3723

Browse files
authored
Merge pull request #1130 from yast/self_update_fix_SP6
[SLE15-SP6] Fixed comparing versions in the self-update version check
2 parents 0851b52 + c1246bc commit 10b3723

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

package/yast2-installation.changes

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
-------------------------------------------------------------------
2+
Tue Dec 17 15:05:22 UTC 2024 - Ladislav Slezák <[email protected]>
3+
4+
- Self-update fix (bsc#1234661)
5+
- Properly compare the package versions from the inst-sys and
6+
the self-update repository
7+
- Remove the architecture suffix when reading the package version
8+
from the inst-sys (the /.packages.root file)
9+
- This fixes false alarm about incorrect self-update repository
10+
when the installation is booted from PXE using the updated
11+
tftpboot-installation-* packages (not the GA version)
12+
113
-------------------------------------------------------------------
214
Tue Aug 27 09:06:22 UTC 2024 - Stefan Hundhammer <[email protected]>
315

package/yast2-installation.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717

1818
Name: yast2-installation
19-
Version: 4.6.13
19+
Version: 4.6.14
2020
Release: 0
2121
Summary: YaST2 - Installation Parts
2222
License: GPL-2.0-only

src/lib/installation/instsys_packages.rb

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ def self.read(file = "/.packages.root")
2727
name, version = /^(\S+) \[(\S+)\]/.match(line)[1, 2]
2828
next unless name && version
2929

30+
# remove the architecture suffix
31+
version.sub!(/\.(noarch|aarch64|i[3-6]86|ppc64|ppc64le|s390x?|x86_64)$/, "")
32+
3033
# nil repository ID
3134
packages << Y2Packager::Package.new(name, nil, version)
3235
end

test/instsys_packages_test.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@
2929

3030
it "reads the package versions" do
3131
pkgs = Installation::InstsysPackages.read(test_file)
32+
3233
yast2 = pkgs.find { |p| p.name == "yast2" }
34+
yast2_add_on = pkgs.find { |p| p.name == "yast2-add-on" }
35+
36+
# no "x86_64" suffix
37+
expect(yast2.version).to eq("4.2.67-1.7")
3338

34-
expect(yast2.version).to eq("4.2.67-1.7.x86_64")
39+
# no "noarch" suffix
40+
expect(yast2_add_on.version).to eq("4.2.15-1.30")
3541
end
3642
end
3743
end

0 commit comments

Comments
 (0)