Skip to content

Commit

Permalink
Merge pull request #125 from yast/huha-iscsiuio-sp5
Browse files Browse the repository at this point in the history
Add Support Packages on Demand [SLE-15-SP5]
  • Loading branch information
shundhammer authored Sep 20, 2023
2 parents ccadf4a + 92676c2 commit 6e26e6d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
6 changes: 6 additions & 0 deletions package/yast2-iscsi-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 19 14:01:12 UTC 2023 - Stefan Hundhammer <[email protected]>

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

-------------------------------------------------------------------
Thu Feb 10 16:29:34 UTC 2023 - Ancor Gonzalez Sosa <[email protected]>

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


Name: yast2-iscsi-client
Version: 4.5.7
Version: 4.5.8
Release: 0
Summary: YaST2 - iSCSI Client Configuration
License: GPL-2.0-only
Expand Down
32 changes: 14 additions & 18 deletions src/modules/IscsiClient.rb
Original file line number Diff line number Diff line change
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 6e26e6d

Please sign in to comment.