diff --git a/package/yast2-iscsi-client.changes b/package/yast2-iscsi-client.changes index 65637e1..741f2cc 100644 --- a/package/yast2-iscsi-client.changes +++ b/package/yast2-iscsi-client.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Sep 19 14:01:12 UTC 2023 - Stefan Hundhammer + +- Add support packages on demand (bsc#1214273) +- 5.0.1 + +------------------------------------------------------------------- + Wed Aug 30 20:16:10 UTC 2023 - Josef Reidinger - 5.0.0 (#bsc1185510) diff --git a/package/yast2-iscsi-client.spec b/package/yast2-iscsi-client.spec index b91e2ad..59eb51b 100644 --- a/package/yast2-iscsi-client.spec +++ b/package/yast2-iscsi-client.spec @@ -17,7 +17,7 @@ Name: yast2-iscsi-client -Version: 5.0.0 +Version: 5.0.1 Release: 0 Summary: YaST2 - iSCSI Client Configuration License: GPL-2.0-only diff --git a/src/modules/IscsiClient.rb b/src/modules/IscsiClient.rb index 485088e..6fae218 100644 --- a/src/modules/IscsiClient.rb +++ b/src/modules/IscsiClient.rb @@ -37,6 +37,8 @@ module Yast class IscsiClientClass < Module + include Yast::Logger + def main textdomain "iscsi-client" @@ -99,23 +101,17 @@ def Modified # check if package open-iscsi is installed def installed_packages - # don't check interactively for packages (bnc#367300) - # skip it during second stage or when create AY profile - return true if Stage.cont || Stage.initial || Mode.config - Builtins.y2milestone("Check if open-iscsi package installed") - ret = false - if !Package.InstallMsg( - "open-iscsi", - _( - "

To configure the iSCSI initiator, the %1 package must be installed.

" - ) + - _("

Install it now?

") - ) - Popup.Error(Message.CannotContinueWithoutPackagesInstalled) - else - ret = true - end - ret + needed_packages = ["open-iscsi"] + needed_packages << "iscsiuio" if IscsiClientLib.iscsiuio_relevant? + log.info("Needed packages: #{needed_packages}") + # Install the packages, if needed. Ask the user for confirmation. + # If it fails, warn the user about YaST possibly failing and ask for + # confirmation. + # + # Notice that this takes care of AutoYaST mode and creating an AutoYaST + # profile; and during initial installation, it simply adds the packages + # to the install set. + Package.CheckAndInstallPackagesInteractive(needed_packages) end # Dump the iscsi-client settings to a single map @@ -202,7 +198,7 @@ def Read return false if false Builtins.sleep(sl) - # check if required package is installed + # check if required packages are installed return false if !installed_packages return false if IscsiClientLib.getiBFT == nil # Progress finished