![](https://seccdn.libravatar.org/avatar/5cdd10d836bdda3796cf6bc1ab2d5a78.jpg?s=120&d=mm&r=g)
On Fri, 2023-10-20 at 12:17 +0200, Ancor Gonzalez Sosa wrote:
On 10/20/23 11:13, Simon Lees wrote:
So really what i'm leaning towards is in an ideal world we should have a new flag and we probably should just pick one pattern for each of the major desktops and another for "Server / GUI Less" setups. Sitting alongside that add a "Custom / Advanced" checkbox that adds everything that currently has the visible flag so that users who want can still do a detailed setup.
That sounds to me like a path worth exploring.
How would that flag be implemented in the patterns?
'visibility' is achieved by a 'Provides: pattern-visible()` for the specific pattern. The main difference between visible and invisible patterns is how you can interact with zypper / yast on them: "zypper se -t pattern" shows you all the 'visible' patterns (same as yast shows I'd assume) but there is also zypper se -t package /patterns-*/ - which lists the resulting packages (a pattern is, in fact,nothing more than a meta package with provides/requires/recommends/…) Looking at the numbers:
zypper se -t package /^patterns-*/ | grep -c package 182
zypper se -t pattern | grep -c pattern 104
So we have 104 'visible' patterns, and a total of 182 patterns
I know there is already a "visible" flag and I assume this will use a similar mechanism.
As we are basically trying to mimmick 'system roles' (even though that concept went further, as it also allowed config changes, like e.g. Network managing stack and such to happen), we could do something like: Provides: sytem-role() (of course agama will likely want libzypp to parse that, and not do it on its own) The 'easy' ones would be the desktop patterns - they could all provide this symbol and Agama could use this to create the UI (Like for the current patterns list, we will want ordering to happen - probably the pattern-order is good enough for that) Trickier are the other system roles we offer, like 'transactional server': this is not only the patterns that are relevant, but actually the FS layout (btrfs/ro) that matter here. Not sure if/how you plan on implementing this purely based on patterns.
But if I correctly understand the content of [1], the "visible" flag is currently used for the following patterns:
- Base System - Enhanced Base System - Minimal Appliance Base - 32-Bit Runtime Environment - AppArmor - SELinux - Tests for the Update Stack - A very basic desktop (previously part of x11 pattern) - Console Tools - Help and Support Documentation - FIPS 140-2 specific packages - Software Management - X Window System
Which looks like a pretty arbitrary selection to me. So I can only guess the content of the "visible" flag diluted over time.
That is certinaly an issue - visibility has never been enforced or even widely discussed. For most parts: once you create it, you want to show it. Or you'd not have created it. So, imho, the 'invisible' patterns are the odd ones in the game. Cheers, Dominique