tl;dr
Rip out the high-level YQPackageSelector widget from YaST and make it a standalone Qt program without any YaST dependencies.
The Past and the Present
We used to have and still have a powerful software selection with the YaST sw_single module (and the YaST patterns counterpart): You can select software down to the package level, you can easily select one of many available package versions, you can select entire patterns - or just view them and pick individual packages from patterns.
You can search packages based on name, description, "requires" or "provides" level, and many more things.
The Future
YaST is on its way out, to be replaced by the new Agama installer and Cockpit for system administration. Those tools can do many things, but fine-grained package selection is not among them. And there are also no other Open Source tools available for that purpose that even come close to the YaST package selection.
Many aspects of YaST have become obsolete over the years; many subsystems now come with a good default configuration, or they can configure themselves automatically. Just think about sound or X11 configuration; when did you last need to touch them?
For others, the desktops bring their own tools (e.g. printers), or there are FOSS configuration tools (NetworkManager, BlueMan). Most YaST modules are no longer needed, and for many others there is a replacement in tools like Cockpit.
But no longer having a powerful fine-grained package selection like in YaST sw_single will hurt. Big time. At least until there is an adequate replacement, many users will want to keep it.
The Idea
YaST sw_single always revolved around a powerful high-level widget on the abstract UI level. Libyui has low-level widgets like YPushButton, YCheckBox, YInputField, more advanced ones like YTable, YTree; and some few very high-level ones like YPackageSelector and YPatternSelector that do the whole package selection thing alone, working just on the libzypp level and changing the status of packages or patterns there.
For the YaST Qt UI, the YQPackageSelector / YQPatternSelector widgets work purely on the Qt and libzypp level; no other YaST infrastructure involved, in particular no Ruby (or formerly YCP) interpreter, no libyui-level widgets, no bindings between Qt / C++ and Ruby / YaST-core, nothing. So it's not too hard to rip all that part out of YaST and create a standalone program from it.
For the NCurses UI, the NCPackageSelector / NCPatternSelector create a lot of libyui widgets (inheriting YWidget / NCWidget) and use a lot of libyui calls to glue them together; and all that of course still needs a lot of YaST / libyui / libyui-ncurses infrastructure. So NCurses is out of scope here.
Preparatory Work: Initializing the Package Subsystem
To see if this is feasible at all, the existing UI examples needed some fixing to check what is needed on that level. That was the make-or-break decision: Would it be realistically possible to set the needed environment in libzypp up (without being stranded in the middle of that task alone at the end of the hack week)?
Yes, it is: That part is already working:
https://github.com/yast/yast-ycp-ui-bindings/pull/71
Go there for a screenshot
That's already halfway there.
The complete Ruby code of this example is here. The real thing will be pure C++ without any YaST dependencies.
The Plan
DONE: Clone libyui where libyui (high-level), libyui-qt, libyui-qt-pkg live
DONE: Slash and burn: Get rid of the unneeded parts one by one; libyui-ncurses, libyui-ncurses-pkg, libyui-rest-api, libyui-rest-api-qt, libyui-rest-api-ncurses, libyui-qt-graph.
DONE: Reduce the CMake build environment to what is actually needed.
DONE: One by one move the parts that libyui-qt-pkg needs from the outside to that directory
DONE: Slash and burn some more: Get rid of all the stuff that YQPackageSelector / YQPkg* don't need
Replace the libyui / YEvent-based event handling with standard Qt event handling so the program reacts properly to "Cancel", "Accept", WM_Close "[x]"
Come up with one or more classes to initialize libzypp; basically those Pkg.xy() calls that are now new in the UI examples (in their C++ counterparts, of course)
Come up with one or more classes to handle the "commit" phase where packages are actually installed / updated / deleted
Write the most basic callbacks for the commit phase to show at least some progress
Add basic session handling for window size and position etc. (QSettings)
Write the remaining ton of callbacks for the commit phase to show progress, errors and questions
Make a more user-friendly UI for the commit phase, not just that single progress bar that we have right now; possibly allowing the user to show more details or just the progress bar
Use a more modern development method for that commit phase based on Qt Designer and .ui files (see QDirStat for examples)
Future Plans (After this Hack Week)
- Also make the main screen prettier, based on Qt Designer and .ui files; add some margins and some eye candy
Out of Scope
Repos management. This will still be left to zypper commands for the time being.
An NCurses version. The NCurses UI has been the bane of YaST development since two and a half decades - since 1999. It was always the limiting factor, it was alwas the reason why we could never use advanced Qt features, it was always the reason why YaST always looked so fugly; so 1980s, so mainframe-like.
NCurses
Those who claim they absolutely need the NCurses UI, and they cannot use a Qt application, are welcome to use the command line: There is always zypper
. We will no longer let a 1970s text terminal mode like NCurses be the limiting factor for a good UI.
It was mostly NCurses that kept YaST so ugly that it was finally time to kill it in favor of a web UI like Agama. In this new web UI world, nobody has argued yet that an NCurses UI is an urgent requirement; all of a sudden, everybody can also live just fine with only a browser-based UI.
Devel Repo
This project is part of:
Hack Week 24
Activity
Comments
-
about 8 hours ago by shundhammer | Reply
Update Tue 2024-11-19 18:00: Slashing and burning is mostly done; there is now a standalone binary that does not depend on (or link against) any YaST lib anymore. The stripped binary is just 838 k.
It doesn't have any content yet, and it's quite ugly, but it shows the principle.
Similar Projects
Port some classic game to Linux by MDoucha
Let's pick some old classic game, reverse engin...
New KDE Plasma notification app/applet by apappas
Description
My memory is terrible so I depe...
Create an Android app for Syncthing as part of the Syncthing Tray project by mkittler
Description
There's already an app but code...
Update Haskell ecosystem in Tumbleweed to GHC-9.10.x by psimons
Description
We are currently at GHC-9.8.x...
Digital art wallpapers for openSUSE Leap and Tumbleweed by lkocman
Description
We've enrolled set of new wal...
Create openSUSE images for Arm/RISC-V boards by avicenzi
[comment]: # (Please use the project descriptio...
New openSUSE-welcome by lkocman
Project Description
Let's revisit our exi...
Enlightenment in Leap 16 by simotek
Description
Get the Enlightenment stack + X...