Skip to content

Commit

Permalink
Merge pull request #1204 from yast/huha-force-ui
Browse files Browse the repository at this point in the history
Force Creating the UI before Checking -pkg etc. UI Plug-ins
  • Loading branch information
shundhammer committed Nov 15, 2021
2 parents 58a49bb + 62ae939 commit 457d9b7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
14 changes: 13 additions & 1 deletion library/general/src/lib/ui/ui_extension_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ class UIExtensionChecker
# Constructor: Create a UI extension checker for the specified extension.
#
# @param ext_name [String] Short name of the UI extension ("pkg", "graph")
# @param force_ui [Boolean] Enforce creating a UI?
#
def initialize(ext_name)
def initialize(ext_name, force_ui = true)
textdomain "base"
@ext_name = ext_name
@ok = false
ensure_ui_created if force_ui
@ui_plugin_info = UIPluginInfo.new
ensure_ext_installed
end
Expand Down Expand Up @@ -67,6 +69,16 @@ def ensure_ext_installed
@ok
end

# Ensure that the UI is actually created: In CLI mode, that might be
# delayed because normally they should't create a UI at all.
#
def ensure_ui_created
# Just a UI call that doesn't do anything; this is already sufficient to
# load the UI main plug-in completely if it wasn't loaded yet.
# See also bsc#1192650
UI.WidgetExists(:foo)
end

# Check if the UI extension plug-in is installed.
# This also sets @ok.
#
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Nov 15 17:33:48 UTC 2021 - Stefan Hundhammer <shundhammer@suse.com>

- Force creating the UI before checking -pkg etc. UI plug-ins
(bsc#1192650)
- 4.4.22

-------------------------------------------------------------------
Fri Nov 12 12:32:19 UTC 2021 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

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


Name: yast2
Version: 4.4.21
Version: 4.4.22
Release: 0
Summary: YaST2 Main Package
License: GPL-2.0-only
Expand Down

0 comments on commit 457d9b7

Please sign in to comment.