sw_single: Check for -pkg UI Plug-In and Prompt to Install it if Needed #578
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello
https://trello.com/c/gT8nMq7O/2635-3-featureshouldhave-handle-more-gracefully-when-libyui-libraries-are-missing
Jira
Related PRs
Problem
When a user installed the system with "no recommends", i.e. recommended packages were not installed, the resulting system will also not have the Qt-Pkg (YQPackageSelector) plug-in because the libyui-qt-pkg package is not required unconditionally.
So when the user starts the YaST control center in the graphical (Qt) version and wants to start the YaST package management module from there, this will fail with a very obscure error message telling the user that "UI plug-in qt-pkg could not be loaded".
Desired Outcome
Give the user a much better message so there is a realistic chance to fix the problem.
Minimum: Give a hint that the package needed for that action was not installed, of course including what package that was.
Better: Open a pop-up dialog explaining the situation and offering to try to install that package directly from there, and give a hint to the alternative: Start the package management module in the NCurses version.
Chosen Approach
This checks if the "pkg" UI extension (
libyui-qt-pkg42
,libyui-ncurses-pkg42
) is installed, and if not, it asks the user if it should now be installed. If the user confirms that, the package is installed, and the module is run as usual. If the user does not wish to install that package, the module exits.Screenshots
Test
Either manually uninstall package
libyui-qt-pkg15
or brute-force delete the binary plug-in:Then start the
sw_single
module. It should open one of the above pop-ups and reinstall the package and open the package selection immediately afterwards without the need for restarting the YaST module.