Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sw_single: Check for -pkg UI Plug-In and Prompt to Install it if Needed #578

Merged
merged 4 commits into from Sep 15, 2021

Conversation

shundhammer
Copy link
Contributor

@shundhammer shundhammer commented Sep 14, 2021

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

need-pkg-installed-qt

need-pkg-installed-ncurses

Test

Either manually uninstall package libyui-qt-pkg15 or brute-force delete the binary plug-in:

sudo rm -f /usr/lib64/yui/libyui-ncurses-pkg.so.15.0.0

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.

@coveralls
Copy link

coveralls commented Sep 14, 2021

Coverage Status

Coverage decreased (-0.009%) to 35.335% when pulling 459e819 on huha-plugins into 4c2f9c5 on master.

@shundhammer shundhammer merged commit 803fe73 into master Sep 15, 2021
@shundhammer shundhammer deleted the huha-plugins branch September 15, 2021 17:00
@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #159 successfully finished
✔️ Created OBS submit request #919268

@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #87 successfully finished
✔️ Created IBS submit request #252140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants