From c748dbdbb8b8550b6ee387b8b083c685e733bd01 Mon Sep 17 00:00:00 2001
From: Michal Filka <mfilka@suse.cz>
Date: Fri, 9 Feb 2024 11:28:26 +0100
Subject: [PATCH 1/4] Adapted list of attributes for storage in general section

---
 src/modules/AutoinstStorage.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/AutoinstStorage.rb b/src/modules/AutoinstStorage.rb
index 09ae88641..93d15fd11 100644
--- a/src/modules/AutoinstStorage.rb
+++ b/src/modules/AutoinstStorage.rb
@@ -320,7 +320,7 @@ def preprocessed_settings(settings)
       preprocessor.run(settings)
     end
 
-    ALLOWED_OVERRIDES = [:lvm, :encryption_password].freeze
+    ALLOWED_OVERRIDES = [:lvm, :lvm_vg_reuse, :encryption_password].freeze
     private_constant :ALLOWED_OVERRIDES
     DELETE_RESIZE_OVERRIDES = [
       :windows_delete_mode, :linux_delete_mode, :other_delete_mode, :resize_windows

From 6cdaec05e77a2f576790cac9fb48b25241db1bc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= <lslezak@suse.com>
Date: Thu, 15 Feb 2024 10:20:55 +0100
Subject: [PATCH 2/4] Install plain SLES instead of SLE_HPC (jsc#PED-7841)

- It has been dropped in SP6
- 4.6.5

(jsc#PED-7841)
---
 package/autoyast2.changes        |  7 +++++++
 package/autoyast2.spec           |  2 +-
 src/modules/AutoinstFunctions.rb | 19 +++++++++++++++++--
 3 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/package/autoyast2.changes b/package/autoyast2.changes
index de25e406a..46f7af03c 100644
--- a/package/autoyast2.changes
+++ b/package/autoyast2.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Thu Feb 15 09:09:59 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
+
+- Install standard SLES when the AY XML profile selects SLE_HPC,
+  it has been dropped in SP6 (jsc#PED-7841)
+- 4.6.5
+
 -------------------------------------------------------------------
 Fri Sep 22 10:25:35 UTC 2023 - Ancor Gonzalez Sosa <ancor@suse.com>
 
diff --git a/package/autoyast2.spec b/package/autoyast2.spec
index 360b43672..028c6c270 100644
--- a/package/autoyast2.spec
+++ b/package/autoyast2.spec
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.6.4
+Version:        4.6.5
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only
diff --git a/src/modules/AutoinstFunctions.rb b/src/modules/AutoinstFunctions.rb
index 835b59a77..a8ec2030d 100644
--- a/src/modules/AutoinstFunctions.rb
+++ b/src/modules/AutoinstFunctions.rb
@@ -8,6 +8,13 @@ module Yast
   class AutoinstFunctionsClass < Module
     include Yast::Logger
 
+    # special mapping for handling dropped or renamed products,
+    # a map with <old product name> => <new_product name> values
+    PRODUCT_MAPPING = {
+      # the SLE_HPC product was dropped and replaced by standard SLES in SP6
+      "SLE_HPC" => "SLES"
+    }.freeze
+
     def main
       textdomain "installation"
 
@@ -220,7 +227,7 @@ def identify_product_by_selection(profile)
     # FIXME: Currently it returns first found product name. It should be no
     # problem since this section was unused in AY installation so far.
     # However, it might be needed to add a special handling for multiple
-    # poducts in the future. At least we can filter out products which are
+    # products in the future. At least we can filter out products which are
     # not base products.
     #
     # @param profile [Hash] AutoYaST profile
@@ -234,7 +241,15 @@ def base_product_name(profile)
         return nil
       end
 
-      software.fetch_as_array("products").first
+      product = software.fetch_as_array("products").first
+      new_product = PRODUCT_MAPPING[product]
+
+      if new_product
+        log.info "Replacing requested product #{product.inspect} with #{new_product.inspect}"
+        return new_product
+      end
+
+      product
     end
   end
 

From e44a6fbe2d08e454556f28c43f8030be925d19fa Mon Sep 17 00:00:00 2001
From: Michal Filka <mfilka@suse.cz>
Date: Thu, 15 Feb 2024 11:21:02 +0100
Subject: [PATCH 3/4] Updated changelog

---
 package/autoyast2.changes | 8 ++++++++
 package/autoyast2.spec    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/autoyast2.changes b/package/autoyast2.changes
index de25e406a..706787c19 100644
--- a/package/autoyast2.changes
+++ b/package/autoyast2.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Thu Feb 15 10:19:32 UTC 2024 - Michal Filka <mfilka@suse.com>
+
+- jsc#PED-6407
+  - enabled lvm_vg_reuse to be used in general/storage/proposal
+    section 
+- 4.6.5
+
 -------------------------------------------------------------------
 Fri Sep 22 10:25:35 UTC 2023 - Ancor Gonzalez Sosa <ancor@suse.com>
 
diff --git a/package/autoyast2.spec b/package/autoyast2.spec
index 360b43672..028c6c270 100644
--- a/package/autoyast2.spec
+++ b/package/autoyast2.spec
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.6.4
+Version:        4.6.5
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only

From d7bb69f2deb676fb4aa79b60e04ef87e85fcd877 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= <lslezak@suse.com>
Date: Thu, 15 Feb 2024 14:59:33 +0100
Subject: [PATCH 4/4] Fix changelog time stamps

---
 package/autoyast2.changes | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/autoyast2.changes b/package/autoyast2.changes
index 8a60e7bd7..559446ed2 100644
--- a/package/autoyast2.changes
+++ b/package/autoyast2.changes
@@ -1,5 +1,5 @@
 -------------------------------------------------------------------
-Thu Feb 15 09:09:59 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
+Thu Feb 15 13:59:22 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
 
 - Install standard SLES when the AY XML profile selects SLE_HPC,
   it has been dropped in SP6 (jsc#PED-7841)