Skip to content

Commit

Permalink
rename SLES_HPC -> SLE_HPC (bsc#1095053)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsrain committed May 29, 2018
1 parent b3a48a0 commit 041df91
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions library/packages/src/lib/y2packager/product_upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class ProductUpgrade
MAPPING = {
# SLES12 + HPC module => SLESHPC15
# (a bit tricky, the module became a new base product!)
["SLES", "sle-module-hpc"] => "SLES_HPC",
["SLES", "sle-module-hpc"] => "SLE_HPC",
# this is an internal product so far...
["SLE-HPC"] => "SLES_HPC",
["SLE-HPC"] => "SLE_HPC",
# SLES11 => SLES15
["SUSE_SLES"] => "SLES",
# SLED11 => SLED15
Expand Down Expand Up @@ -107,7 +107,7 @@ def find_by_mapping(available)

# sort the keys by length, try more products first
# to find the most specific upgrade, prefer the
# SLES + sle-module-hpc => SLES_HPC upgrade to plain SLES => SLES upgrade
# SLES + sle-module-hpc => SLE_HPC upgrade to plain SLES => SLES upgrade
# (if that would be in the list)
upgrade = MAPPING.keys.sort_by(&:size).find do |keys|
keys.all? { |name| installed.any? { |p| p.name == name } }
Expand Down
4 changes: 2 additions & 2 deletions library/packages/test/y2packager/product_upgrade_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

context "several base products are available" do
let(:sles) { Y2Packager::Product.new(name: "SLES") }
let(:sles_hpc) { Y2Packager::Product.new(name: "SLES_HPC") }
let(:sles_hpc) { Y2Packager::Product.new(name: "SLE_HPC") }
let(:hpc_module) { Y2Packager::Product.new(name: "sle-module-hpc") }
let(:sles11) { Y2Packager::Product.new(name: "SUSE_SLES") }

Expand All @@ -49,7 +49,7 @@
expect(described_class.new_base_product).to be(sles)
end

it "returns SLES_HPC for SLES and HPC module installed" do
it "returns SLE_HPC for SLES and HPC module installed" do
expect(Y2Packager::Product).to receive(:installed_products)
.and_return([sles, hpc_module])
expect(described_class.new_base_product).to be(sles_hpc)
Expand Down
6 changes: 6 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue May 29 14:26:11 UTC 2018 - jsrain@suse.cz

- rename SLES_HPC -> SLE_HPC (bsc#1095053)
- 4.0.76

-------------------------------------------------------------------
Wed May 23 15:25:04 CEST 2018 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2
Version: 4.0.75
Version: 4.0.76
Release: 0
Summary: YaST2 - Main Package
License: GPL-2.0
Expand Down

0 comments on commit 041df91

Please sign in to comment.