Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-agama-yast for 
openSUSE:Factory checked in at 2026-02-27 17:02:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-agama-yast (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-agama-yast.new.29461 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-agama-yast"

Fri Feb 27 17:02:12 2026 rev:37 rq:1334918 version:19.pre.devel1670.99418d6d9

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-agama-yast/rubygem-agama-yast.changes    
2026-02-07 15:33:57.902715563 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-agama-yast.new.29461/rubygem-agama-yast.changes
 2026-02-27 17:04:08.889794767 +0100
@@ -1,0 +2,41 @@
+Wed Feb 18 20:28:02 UTC 2026 - Josef Reidinger <[email protected]>
+
+- Add support for updateNvram bootloader key (jsc#PED-14224)
+- Add support for AutoYaST key bootloader->update_nvram conversion
+
+-------------------------------------------------------------------
+Mon Feb 16 16:31:50 UTC 2026 - José Iván López González <[email protected]>
+
+- Avoid automatic deactivation of unlisted DASD devices
+  (gh#agama-project/agama#3181).
+
+-------------------------------------------------------------------
+Fri Feb 13 09:22:48 UTC 2026 - José Iván López González <[email protected]>
+
+- Calculate bootloader after calling to probe or activate storage
+  (related to bsc#1258134).
+
+-------------------------------------------------------------------
+Fri Feb 13 08:12:01 UTC 2026 - Josef Reidinger <[email protected]>
+
+- Fix clearing bootloader cache to ensure that proper storage
+  configuration is used (bsc#1258134)
+
+-------------------------------------------------------------------
+Thu Feb 12 15:22:50 UTC 2026 - Ancor Gonzalez Sosa <[email protected]>
+
+- Fix reading the startup mode in iSCSI
+  (gh#agama-project/agama#3161).
+
+-------------------------------------------------------------------
+Thu Feb 12 08:33:58 UTC 2026 - Josef Reidinger <[email protected]>
+
+- Split storage writting config and final unmount action
+  (bsc#1257791)
+
+-------------------------------------------------------------------
+Wed Feb 11 14:48:58 UTC 2026 - José Iván López González <[email protected]>
+
+- Fix JSON of DASD format summary (gh#agama-project/agama#3128).
+
+-------------------------------------------------------------------

Old:
----
  agama-yast-19.pre.devel1415.80da57854.gem

New:
----
  agama-yast-19.pre.devel1670.99418d6d9.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ agama-yast.spec ++++++
--- /var/tmp/diff_new_pack.p9fEOB/_old  2026-02-27 17:04:09.745830291 +0100
+++ /var/tmp/diff_new_pack.p9fEOB/_new  2026-02-27 17:04:09.749830457 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           agama-yast
-Version:        19.pre.devel1415.80da57854
+Version:        19.pre.devel1670.99418d6d9
 Release:        0
 %define mod_name agama-yast
 %define mod_full_name %{mod_name}-%{version}

++++++ rubygem-agama-yast.spec ++++++
--- /var/tmp/diff_new_pack.p9fEOB/_old  2026-02-27 17:04:09.817833279 +0100
+++ /var/tmp/diff_new_pack.p9fEOB/_new  2026-02-27 17:04:09.821833445 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-agama-yast
-Version:        19.pre.devel1415.80da57854
+Version:        19.pre.devel1670.99418d6d9
 Release:        0
 %define mod_name agama-yast
 %define mod_full_name %{mod_name}-%{version}

++++++ agama-yast-19.pre.devel1415.80da57854.gem -> 
agama-yast-19.pre.devel1670.99418d6d9.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/autoyast/bootloader_reader.rb 
new/lib/agama/autoyast/bootloader_reader.rb
--- old/lib/agama/autoyast/bootloader_reader.rb 1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/agama/autoyast/bootloader_reader.rb 1980-01-02 01:00:00.000000000 
+0100
@@ -47,6 +47,7 @@
         end
 
         bootloader["extraKernelParams"] = global["append"] unless 
global["append"].to_s.empty?
+        bootloader["updateNvram"] = global["update_nvram"] unless 
global["update_nvram"].to_s.empty?
 
         { "bootloader" => bootloader }
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/dbus/storage/dasd.rb 
new/lib/agama/dbus/storage/dasd.rb
--- old/lib/agama/dbus/storage/dasd.rb  1980-01-02 01:00:00.000000000 +0100
+++ new/lib/agama/dbus/storage/dasd.rb  1980-01-02 01:00:00.000000000 +0100
@@ -101,7 +101,7 @@
 
       private
 
-        # @return [Agama::Storage::ISCSI::Manager]
+        # @return [Agama::Storage::DASD::Manager]
         attr_reader :manager
 
         # Performs the configuration process in a separate thread.
@@ -173,7 +173,7 @@
             {
               channel:            format_status.dasd.id,
               totalCylinders:     format_status.cylinders,
-              FormattedCylinders: format_status.progress,
+              formattedCylinders: format_status.progress,
               finished:           format_status.done?
             }
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/dbus/storage/manager.rb 
new/lib/agama/dbus/storage/manager.rb
--- old/lib/agama/dbus/storage/manager.rb       1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/agama/dbus/storage/manager.rb       1980-01-02 01:00:00.000000000 
+0100
@@ -60,12 +60,15 @@
           dbus_method(:Probe) { probe }
           dbus_method(:Install) { install }
           dbus_method(:Finish) { finish }
+          dbus_method(:Umount) { umount }
           dbus_method(:SetLocale, "in locale:s") { |locale| 
backend.configure_locale(locale) }
           dbus_method(:GetSystem, "out system:s") { recover_system }
           dbus_method(:GetConfig, "out config:s") { recover_config }
           dbus_method(:SetConfig, "in product:s, in config:s") { |p, c| 
configure(p, c) }
+          dbus_method(
+            :GetConfigFromModel, "in model:s, out config:s"
+          ) { |m| convert_config_model(m) }
           dbus_method(:GetConfigModel, "out model:s") { recover_config_model }
-          dbus_method(:SetConfigModel, "in model:s") { |m| 
configure_with_model(m) }
           dbus_method(:SolveConfigModel, "in model:s, out result:s") { |m| 
solve_config_model(m) }
           dbus_method(:GetProposal, "out proposal:s") { recover_proposal }
           dbus_method(:GetIssues, "out issues:s") { recover_issues }
@@ -77,6 +80,8 @@
 
         # Implementation for the API method #Activate.
         def activate
+          logger.info("Activating storage")
+
           start_progress(3, ACTIVATING_STEP)
           backend.reset_activation if backend.activated?
           backend.activate
@@ -93,6 +98,8 @@
 
         # Implementation for the API method #Probe.
         def probe
+          logger.info("Probing storage")
+
           start_progress(3, ACTIVATING_STEP)
           backend.activate unless backend.activated?
 
@@ -127,6 +134,12 @@
           finish_progress
         end
 
+        def umount
+          start_progress(1, _("Unmounting devices"))
+          backend.umount
+          finish_progress
+        end
+
         # NOTE: memoization of the values?
         # @return [String]
         def recover_system
@@ -210,22 +223,13 @@
           finish_progress
         end
 
-        # Applies the given serialized config model according to the JSON 
schema.
+        # Converts the given serialized config model according to the JSON 
schema.
         #
-        # @param serialized_model [String] Serialized storage config model.
-        def configure_with_model(serialized_model)
-          start_progress(1, CONFIGURING_STEP)
-
-          model_json = JSON.parse(serialized_model, symbolize_names: true)
-          config = Agama::Storage::ConfigConversions::FromModel.new(
-            model_json,
-            product_config: product_config,
-            storage_system: proposal.storage_system
-          ).convert
-          config_json = { storage: 
Agama::Storage::ConfigConversions::ToJSON.new(config).convert }
-          calculate_proposal(config_json)
-
-          finish_progress
+        # @param serialized_model [String] Serialized config model.
+        # @return [String] Serialized config according to JSON schema.
+        def convert_config_model(serialized_model)
+          config_json = config_from_model(serialized_model)
+          JSON.pretty_generate(config_json)
         end
 
         # Solves the given serialized config model.
@@ -260,35 +264,32 @@
 
         dbus_interface "org.opensuse.Agama.Storage1.Bootloader" do
           dbus_method(:SetConfig, "in serialized_config:s, out result:u") do 
|serialized_config|
-            load_bootloader_config_from_json(serialized_config)
+            configure_bootloader(serialized_config)
           end
           dbus_method(:GetConfig, "out serialized_config:s") do
-            bootloader_config_as_json
+            recover_bootloader_config
           end
         end
 
         # Applies the given serialized config according to the JSON schema.
         #
-        #
         # @raise If the config is not valid.
         #
-        # @param serialized_config [String] Serialized storage config.
+        # @param serialized_config [String] Serialized bootloader config.
         # @return [Integer] 0 success; 1 error
-        def load_bootloader_config_from_json(serialized_config)
-          logger.info("Setting bootloader config from D-Bus: 
#{serialized_config}")
-
+        def configure_bootloader(serialized_config)
+          logger.info("Setting bootloader config: #{serialized_config}")
           backend.bootloader.config.load_json(serialized_config)
           # after loading config try to apply it, so proper packages can be 
requested
           # TODO: generate also new issue from configuration
-          backend.bootloader.configure
-
+          calculate_bootloader
           0
         end
 
         # Gets and serializes the storage config used to calculate the current 
proposal.
         #
         # @return [String] Serialized config according to the JSON schema.
-        def bootloader_config_as_json
+        def recover_bootloader_config
           backend.bootloader.config.to_json
         end
 
@@ -318,10 +319,19 @@
           return unless proposal.storage_json
 
           calculate_proposal(backend.config_json)
+          # The storage proposal with the current settings is not explicitly 
requested. It is
+          # automatically calculated as side effect of calling to probe or 
activate. All the
+          # dependant steps has to be automatically done too, for example, 
reconfiguring bootloader.
+          calculate_bootloader
+        end
+
+        # Performs the bootloader configuration applying the current config.
+        def calculate_bootloader
+          logger.info("Configuring bootloader")
+          backend.bootloader.configure
         end
 
         # @see #configure
-        # @see #configure_with_model
         #
         # @param config_json [Hash, nil] see Agama::Storage::Manager#configure
         def calculate_proposal(config_json = nil)
@@ -331,6 +341,21 @@
           self.ProposalChanged(recover_proposal)
         end
 
+        # Generates a config JSON from a serialized config model.
+        #
+        # @param serialized_model [String] Serialized config model.
+        # @return [Hash] Config according to JSON schema.
+        def config_from_model(serialized_model)
+          model_json = JSON.parse(serialized_model, symbolize_names: true)
+          config = Agama::Storage::ConfigConversions::FromModel.new(
+            model_json,
+            product_config: product_config,
+            storage_system: proposal.storage_system
+          ).convert
+
+          { storage: 
Agama::Storage::ConfigConversions::ToJSON.new(config).convert }
+        end
+
         # JSON representation of the given devicegraph from StorageManager
         #
         # @param meth [Symbol] method used to get the devicegraph from 
StorageManager
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/bootloader.rb 
new/lib/agama/storage/bootloader.rb
--- old/lib/agama/storage/bootloader.rb 1980-01-02 01:00:00.000000000 +0100
+++ new/lib/agama/storage/bootloader.rb 1980-01-02 01:00:00.000000000 +0100
@@ -34,6 +34,12 @@
     class Bootloader
       # Represents bootloader settings
       class Config
+        # Whether bootloader should update persistent RAM.
+        # If kept as nil then default will be used.
+        #
+        # @return [Boolean]
+        attr_accessor :update_nvram
+
         # Whether bootloader should stop on boot menu.
         #
         # @return [Boolean]
@@ -68,6 +74,7 @@
           @keys_to_export = []
           @stop_on_boot_menu = false # false means use proposal, which has 
timeout
           @timeout = 10 # just some reasonable timeout, we do not send it 
anywhere
+          @update_nvram = nil
           @extra_kernel_params = ""
         end
 
@@ -80,6 +87,7 @@
           # our json use camel case
           result[:stopOnBootMenu] = stop_on_boot_menu if 
keys_to_export.include?(:stop_on_boot_menu)
           result[:timeout] = timeout if keys_to_export.include?(:timeout)
+          result[:updateNvram] = update_nvram if 
keys_to_export.include?(:update_nvram)
           if keys_to_export.include?(:extra_kernel_params)
             result[:extraKernelParams] =
               @extra_kernel_params
@@ -94,30 +102,25 @@
         # @return [Config] self
         def load_json(serialized_config)
           hsh = JSON.parse(serialized_config, symbolize_names: true)
-          if hsh.include?(:timeout)
-            self.timeout = hsh[:timeout]
-            keys_to_export.delete(:stop_on_boot_menu)
-            keys_to_export.push(:timeout) unless 
keys_to_export.include?(:timeout)
-
-          end
-          if hsh.include?(:stopOnBootMenu)
-            self.stop_on_boot_menu = hsh[:stopOnBootMenu]
-            keys_to_export.delete(:timeout)
-            unless keys_to_export.include?(:stop_on_boot_menu)
-              keys_to_export.push(:stop_on_boot_menu)
-            end
-          end
-          if hsh.include?(:extraKernelParams)
-            self.extra_kernel_params = hsh[:extraKernelParams]
-            unless keys_to_export.include?(:extra_kernel_params)
-              keys_to_export.push(:extra_kernel_params)
-            end
-          end
+          update_attribute(hsh, :timeout, :timeout, conflicts: 
:stop_on_boot_menu)
+          update_attribute(hsh, :stopOnBootMenu, :stop_on_boot_menu, 
conflicts: :timeout)
+          update_attribute(hsh, :extraKernelParams, :extra_kernel_params)
+          update_attribute(hsh, :updateNvram, :update_nvram)
 
           self.scoped_kernel_params = hsh[:kernelArgs]
 
           self
         end
+
+      private
+
+        def update_attribute(hsh, json_key, attr_key, conflicts: nil)
+          return unless hsh.key?(json_key)
+
+          public_send("#{attr_key}=", hsh[json_key])
+          keys_to_export.delete(conflicts) if conflicts
+          keys_to_export.push(attr_key) unless 
keys_to_export.include?(attr_key)
+        end
       end
 
       # @return [Config]
@@ -138,6 +141,8 @@
         ::Bootloader::OsProber.package_available = false
         # reset disk to always read the recent storage configuration
         ::Yast::BootStorage.reset_disks
+        # reset bootloader factory cache as we want here to reapply config 
from scratch
+        ::Bootloader::BootloaderFactory.clear_cache
         # propose values first. Propose bootloader from factory and do not use
         # current as agama has /etc/sysconfig/bootloader with efi, so it
         # will lead to wrong one.
@@ -176,6 +181,7 @@
         bootloader = ::Bootloader::BootloaderFactory.current
         write_stop_on_boot(bootloader) if 
@config.keys_to_export.include?(:stop_on_boot_menu)
         write_timeout(bootloader) if @config.keys_to_export.include?(:timeout)
+        write_nvram(bootloader) if 
@config.keys_to_export.include?(:update_nvram)
         kernel_params = @config.scoped_kernel_params.values.join(" ")
         @logger.info "scoped kernel params: #{kernel_params}"
 
@@ -188,6 +194,16 @@
         bootloader
       end
 
+      def write_nvram(bootloader)
+        return if @config.update_nvram.nil?
+
+        if bootloader.respond_to?(:update_nvram=)
+          bootloader.update_nvram = @config.update_nvram
+        else
+          @logger.info "bootloader #{bootloader.name} does not support NVRAM 
update"
+        end
+      end
+
       def write_extra_kernel_params(bootloader, kernel_params)
         # no systemd boot support for now
         return unless bootloader.respond_to?(:grub_default)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/dasd/manager.rb 
new/lib/agama/storage/dasd/manager.rb
--- old/lib/agama/storage/dasd/manager.rb       1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/agama/storage/dasd/manager.rb       1980-01-02 01:00:00.000000000 
+0100
@@ -61,10 +61,6 @@
           # Keeps whether a configuration was already applied. In some cases 
it is necessary to
           # consider that the config has not being applied yet, see {#probe}.
           @configured = false
-          # Keeps the list of locked devices. A device is considered as locked 
if it is active at
-          # the time of probing. Those devices should not be deactivated when 
applying a config that
-          # does not include such devices.
-          @locked_devices = []
           # Keeps the list of formatted devices. A device is added to the list 
when it was formatted
           # as effect of applying a config. Those devices should not be 
formatted anymore when
           # applying a new config.
@@ -88,7 +84,6 @@
           @devices = reader.list(force_probing: true)
           # Initialize the attribute just in case the reader doesn't do it 
(see bsc#1209162)
           @devices.each { |d| d.diag_wanted = d.use_diag }
-          assign_locked_devices(@devices)
         end
 
         # Applies the given DASD config.
@@ -106,7 +101,6 @@
           format_devices(config)
           enable_diag(config)
           disable_diag(config)
-          remove_locked_devices(config)
         end
 
         # Whether the system is already configured for the given config.
@@ -169,20 +163,10 @@
         # @param config [Config]
         # @return [Array<Y2S390::Dasd>] Deactivated devices.
         def deactivate_devices(config)
-          # Explictly deactivated devices.
-          deactivated_devices = config.devices
+          devices = config.devices
             .reject(&:active?)
             .map { |d| find_device(d.channel) }
             .compact
-
-          # Devices that are not included in the config and are not locked.
-          missing_devices = devices
-            .reject { |d| device_locked?(d) }
-            .reject { |d| config.include_device?(d.id) }
-
-          devices = deactivated_devices
-            .concat(missing_devices)
-            .uniq
             .select(&:active?)
 
           return [] if devices.empty?
@@ -267,34 +251,6 @@
           devices.each { |d| reader.update_info(d, extended: true) }
         end
 
-        # Sets the list of locked devices.
-        #
-        # A device is considered as locked if it is active and not configured 
yet.
-        #
-        # @param devices [Array<Y2S390::Dasd>]
-        def assign_locked_devices(devices)
-          config = ConfigImporter.new(config_json || {}).import
-          @locked_devices = devices
-            .reject(&:offline?)
-            .reject { |d| config.include_device?(d.id) }
-            .map(&:id)
-        end
-
-        # Removes the given devices from the list of locked devices.
-        #
-        # @param config [Config]
-        def remove_locked_devices(config)
-          config.devices.each { |d| @locked_devices.delete(d.channel) }
-        end
-
-        # Whether the given device is locked.
-        #
-        # @param device [Y2S390::Dasd]
-        # @return [Boolean]
-        def device_locked?(device)
-          @locked_devices.include?(device.id)
-        end
-
         # Whether the given device was formatted.
         #
         # @param device [Y2S390::Dasd]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/finisher.rb 
new/lib/agama/storage/finisher.rb
--- old/lib/agama/storage/finisher.rb   1980-01-02 01:00:00.000000000 +0100
+++ new/lib/agama/storage/finisher.rb   1980-01-02 01:00:00.000000000 +0100
@@ -71,9 +71,7 @@
           StorageStep.new(logger),
           IscsiStep.new(logger),
           BootloaderStep.new(logger),
-          SnapshotsStep.new(logger),
-          CopyLogsStep.new(logger),
-          UnmountStep.new(logger)
+          SnapshotsStep.new(logger)
         ]
       end
 
@@ -211,53 +209,6 @@
           Yast2::FsSnapshot.configure_snapper
         end
       end
-
-      # Step to copy the installation logs
-      class CopyLogsStep < Step
-        SCRIPTS_DIR = "/run/agama/scripts"
-
-        def label
-          _("Copying logs")
-        end
-
-        def run
-          FileUtils.mkdir_p(logs_dir, mode: 0o700)
-          collect_logs
-          copy_scripts
-        end
-
-      private
-
-        def copy_scripts
-          return unless Dir.exist?(SCRIPTS_DIR)
-
-          FileUtils.cp_r(SCRIPTS_DIR, logs_dir)
-        end
-
-        def collect_logs
-          path = File.join(logs_dir, "logs")
-          Yast::Execute.locally(
-            "agama", "logs", "store", "--destination", path
-          )
-        end
-
-        def logs_dir
-          @logs_dir ||= File.join(
-            Yast::Installation.destdir, "var", "log", "agama-installation"
-          )
-        end
-      end
-
-      # Step to unmount the target file-systems
-      class UnmountStep < Step
-        def label
-          _("Unmounting storage devices")
-        end
-
-        def run
-          wfm_write("umount_finish")
-        end
-      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/iscsi/manager.rb 
new/lib/agama/storage/iscsi/manager.rb
--- old/lib/agama/storage/iscsi/manager.rb      1980-01-02 01:00:00.000000000 
+0100
+++ new/lib/agama/storage/iscsi/manager.rb      1980-01-02 01:00:00.000000000 
+0100
@@ -332,7 +332,7 @@
         # @param target_config [ISCSI::Configs::Target]
         # @return [Boolean]
         def startup_changed?(target_config)
-          previous_startup = find_previous_target(target_config)&.startup
+          previous_startup = find_node(target_config)&.startup
           previous_startup != target_config.startup
         end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/manager.rb 
new/lib/agama/storage/manager.rb
--- old/lib/agama/storage/manager.rb    1980-01-02 01:00:00.000000000 +0100
+++ new/lib/agama/storage/manager.rb    1980-01-02 01:00:00.000000000 +0100
@@ -27,6 +27,7 @@
 require "agama/storage/callbacks"
 require "agama/storage/configurator"
 require "agama/storage/finisher"
+require "agama/storage/umounter"
 require "agama/storage/iscsi/manager"
 require "agama/storage/proposal"
 require "agama/with_locale"
@@ -146,6 +147,11 @@
         Finisher.new(logger, product_config).run
       end
 
+      # Performs the final umount of system before reboot.
+      def umount
+        Umounter.new(logger).run
+      end
+
       # Storage proposal manager
       #
       # @return [Storage::Proposal]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/agama/storage/umounter.rb 
new/lib/agama/storage/umounter.rb
--- old/lib/agama/storage/umounter.rb   1970-01-01 01:00:00.000000000 +0100
+++ new/lib/agama/storage/umounter.rb   1980-01-02 01:00:00.000000000 +0100
@@ -0,0 +1,155 @@
+# frozen_string_literal: true
+
+# Copyright (c) [2023-2026] SUSE LLC
+#
+# All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of version 2 of the GNU General Public License as published
+# by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, contact SUSE LLC.
+#
+# To contact SUSE LLC about this file by physical or electronic mail, you may
+# find current contact information at www.suse.com.
+
+require "yast"
+require "yast/i18n"
+require "yast2/execute"
+require "yast2/systemd/service"
+require "yast2/fs_snapshot"
+require "bootloader/finish_client"
+require "y2storage/storage_manager"
+require "agama/helpers"
+require "abstract_method"
+require "fileutils"
+
+Yast.import "Installation"
+
+module Agama
+  module Storage
+    # Auxiliary class to handle the end of the installation including final
+    # copy of logs and umount of devices
+    class Umounter
+      include Helpers
+
+      # Constructor
+      # @param logger [Logger]
+      def initialize(logger)
+        @logger = logger
+      end
+
+      # Execute the final storage actions.
+      def run
+        steps = possible_steps.select(&:run?)
+
+        on_target do
+          steps.each(&:run)
+        end
+      end
+
+    private
+
+      # @return [Logger]
+      attr_reader :logger
+
+      # @return [Config]
+      attr_reader :config
+
+      # All possible steps, that may or not need to be executed
+      def possible_steps
+        [
+          CopyLogsStep.new(logger),
+          UnmountStep.new(logger)
+        ]
+      end
+
+      # Base class for the Finisher steps containing some shared logic
+      class Step
+        include Yast::I18n
+
+        # Base constructor
+        def initialize(logger)
+          textdomain "agama"
+          @logger = logger
+        end
+
+        # Whether this step must be executed
+        def run?
+          true
+        end
+
+        # @!method run
+        #   Executes the step
+        abstract_method :run
+
+        # @!method label
+        #   Sentence to describe the step in the progress report
+        #   @return [String]
+        abstract_method :label
+
+      private
+
+        # @return [Logger]
+        attr_reader :logger
+
+        def wfm_write(function)
+          Yast::WFM.CallFunction(function, ["Write"])
+        end
+      end
+
+      # Step to copy the installation logs
+      class CopyLogsStep < Step
+        SCRIPTS_DIR = "/run/agama/scripts"
+
+        def label
+          _("Copying logs")
+        end
+
+        def run
+          FileUtils.mkdir_p(logs_dir, mode: 0o700)
+          collect_logs
+          copy_scripts
+        end
+
+      private
+
+        def copy_scripts
+          return unless Dir.exist?(SCRIPTS_DIR)
+
+          FileUtils.cp_r(SCRIPTS_DIR, logs_dir)
+        end
+
+        def collect_logs
+          path = File.join(logs_dir, "logs")
+          Yast::Execute.locally(
+            "agama", "logs", "store", "--destination", path
+          )
+        end
+
+        def logs_dir
+          @logs_dir ||= File.join(
+            Yast::Installation.destdir, "var", "log", "agama-installation"
+          )
+        end
+      end
+
+      # Step to unmount the target file-systems
+      class UnmountStep < Step
+        def label
+          _("Unmounting storage devices")
+        end
+
+        def run
+          wfm_write("umount_finish")
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        1980-01-02 01:00:00.000000000 +0100
+++ new/metadata        1980-01-02 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: agama-yast
 version: !ruby/object:Gem::Version
-  version: 19.pre.devel1415.80da57854
+  version: 19.pre.devel1670.99418d6d9
 platform: ruby
 authors:
 - YaST Team
@@ -563,6 +563,7 @@
 - lib/agama/storage/proposal_strategies/base.rb
 - lib/agama/storage/space_settings.rb
 - lib/agama/storage/system.rb
+- lib/agama/storage/umounter.rb
 - lib/agama/storage/volume.rb
 - lib/agama/storage/volume_conversions.rb
 - lib/agama/storage/volume_conversions/to_json.rb

++++++ po.tar.bz2 ++++++
++++ 3554 lines of diff (skipped)

Reply via email to