Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/SLE-15-SP6' into huha-iscsiuio…
Browse files Browse the repository at this point in the history
…-master
  • Loading branch information
shundhammer committed Sep 20, 2023
2 parents e9cee9b + 8fa1cb6 commit 4e4ecc9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
7 changes: 7 additions & 0 deletions package/yast2-iscsi-client.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
Tue Sep 19 14:01:12 UTC 2023 - Stefan Hundhammer <shundhammer@suse.com>

- Add support packages on demand (bsc#1214273)
- 5.0.1

-------------------------------------------------------------------

Wed Aug 30 20:16:10 UTC 2023 - Josef Reidinger <jreidinger@suse.cz>

- 5.0.0 (#bsc1185510)
Expand Down
2 changes: 1 addition & 1 deletion package/yast2-iscsi-client.spec
Expand Up @@ -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
Expand Down
32 changes: 14 additions & 18 deletions src/modules/IscsiClient.rb
Expand Up @@ -37,6 +37,8 @@

module Yast
class IscsiClientClass < Module
include Yast::Logger

def main
textdomain "iscsi-client"

Expand Down Expand Up @@ -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",
_(
"<p>To configure the iSCSI initiator, the <b>%1</b> package must be installed.</p>"
) +
_("<p>Install it now?</p>")
)
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4e4ecc9

Please sign in to comment.