On Tue, 2022-05-24 at 06:14 +0000, Richard Biener wrote:
On Mon, 23 May 2022, Martin Wilck wrote:
I believe that we have better instruments than "Recommends" these days, in particular booleans. In the example at hand, we could create a pseudo-package by the name of, say, "system-requires-wifi". Yast would install this package automatically during system setup if Wifi hardware was deteced. Then Networkmanager could have a dependency like this:
Requires: (NetworkManager-wifi = %{version} if system-requires- wifi)
I disagree - system configuration should not be done via rpm requires (or even recommends).
I don't get your point. The "configuration" step in my approach was not the "requires". It's the installation of "system-requires-wifi". This would have been a manual step, or a setup step done by YaST. rpm wouldn't "configure" anything via requires. It'd just realize that _on this system_, Networkmanager shouldn't be installed without it's Wifi component.
It might be good to do the reverse, have NetworkManager-wifi provide system-wifi-services or something like that. And then have the system configuration tool make sure to install a wifi provider if the user enabled Wifi.
I haven't understood how this would work. Which "system configuration tool" would this be? YaST? Would it also work with plain zypper? And rpm? I'm not saying my idea was perfect, but I believe it's important that the concept is independent of the tool used for package installation. At least plain "zypper" must work. The basic idea is that the user can specify what she needs, in a way the package management system can understand, even though it's orthogonal to ordinary packages. In this case, she'd say she needs "wifi", and thus any package for networking support would pull in all related packages for making wifi functional, documentation packages would pull in wifi-specific pages, etc. Likewise, the user could determine that she's using KDE, and have tools pull in their KDE UI rather than a GTK based UI if there's a choice. Or she could say that she wants language support for Italian, Spanish, and Sanskrit, and have packages pull in the related i18n, but no other. The idea is roughly similar to Gentoo's USE flags concept. Cheers, Martin