I’m trying to install hyprland on OpenSUSE. But it tries to install many extra, unneeded and weird packages with it:
$ sudo zypper in hyprland hyprpaper hypridle waybar kitty
[sudo] password for root:
Loading repository data.
Reading installed packages.
Resolving package dependencies.
The following 13 recommended packages were automatically selected:
fontawesome-fonts granite-lang hyprland-wallpapers kanshi kitty-shell-integration
kitty-terminfo python311-importlib-resources sway swaybar swaynag
system-config-printer system-config-printer-applet xdg-desktop-portal-wlr
The following package is suggested, but will not be installed:
hyprland-devel
The following 73 NEW packages are going to be installed:
alacritty alacritty-bash-completion bc brightnessctl fontawesome-fonts
granite-common granite-lang grim hypridle hyprland hyprland-bash-completion
ryprland-wallpapers hyprpaper jq kanshi kitty kitty-shell-integration
kitty-terminfo libatkmm-1_6-1 libcairomm-1_0-1 libdbusmenu-glib4 libdbusmenu-gtk3-4
libfmt10 libgee-0_8-2 libgiomm-2_4-1 libgranite6 libgtk-layer-shell0 libgtkmm-3_0-1
libhyprcursor0 libhyprlang2 libhyprutils0 libjq1 libjsoncpp25
libjsoncpp25-x86-64-v3 libmpdclient2 libonig5 libpangomm-1_4-1 libplayerctl2
libscfg1 libsdbus-c++1 libseat1 libsndio7 libspdlog1_14 libtomlplusplus3
libvarlink0 libvarlink0-x86-64-v3 libwlroots12 libxcb-errors0 libxcb-ewmh2 pamixer
patterns-sway-sway pavucontrol playerctl playerctl-bash-completion polkit-gnome
python311-importlib-resources slurp sway swaybar swaybg sway-branding-openSUSE
swayidle swaylock swaynag SwayNotificationCenter
SwayNotificationCenter-bash-completion system-config-printer
system-config-printer-applet waybar waybar-branding-openSUSE wob wofi
xdg-desktop-portal-wlr
The following NEW pattern is going to be installed:
sway
73 new packages to install.
Overall downioad size: 68.4 MiB. Already cached: 0 B. After the operation, additional
113.1 MiB will be used.
Backend:classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):
I need some of the recommended packages like hyprland-wallpapers, kitty-terminfo or kitty-shell-integration. But why would I want to install sway and swaybar with hyprland and waybar?
Why does zypper installs all these packages and is there anyway to exclude some of these recommended packages?
Unfortunately that’s not the solution to my answer, neither the reason why does this happens. --no-recommends just prevents installing all the recommended packages but some of them are really useful. Like for sure I need kitty-shell-integration with kitty.
I am as certain that sway is not dependency for hyprland, swaybar for waybar and also other for packages as I am that the Earth is round.
They are totally different compositors, Like saying KDE Plasma is a dependency for GNOME!!!
I’m familiar with package locking but “Package locks serve the purpose of preventing changes to the set of installed packages on the system.”, not packages that haven’t been installed yet
It has nothing to do with what you think. They are dependencies that packager decided to add to the packages. If you believe these dependencies should not be there, contact package maintainers.
I think that’s a trick, not a long-term solution, and zypper’s behavior is still weird. Although it’s not a bad idea if there’s no other way.
Now, each time I want to install an application, I need to first run sudo zypper in <package>, specify the needed recommendations that I want to install, and add them to the next command with --no-recommends.
No, it is not. The standard behaviour is to provide a good user experience with all features and addons of an application installed and enabled by default.
Users which do not want a good user experience (or want to modify their system) can read the documentation (e.g. man zypper) and adapt the standard behaviour by deselecting packages and modifying several zypper confs (e.g. zypp.conf).
openSUSE aims to be user friendly by installing all necessary packages with nearly all features enabled (aka recommends). There is no need to search for additional packages and addons and install them because they get installed automatically.
And as mentioned above by @arvidjaar if you think that a set of recommends for a package is nonsense, you are free to contact the maintainer or modify the package yourself and submit the changed package on OBS.
They are not dependencies, and even the package manager doesn’t recognize them as dependencies. They are recommendations, which is different. Those packages are not dependencies on OpenSUSE or any other distributions I’ve ever seen.
Yes, you were right about this one. I just wonder why it didn’t work last time I tried. I probably made a mistake somewhere.
@hui and @arvidjaar, thank you both for your answers and for spending time on this thread.
I’ve decided to lock those packages because, even if I remove them after installation, they get reinstalled with every update (I’ve tried).
Contacting package maintainers or submitting changes doesn’t seem helpful, as this issue isn’t specific to one package or environment. It’s the same for various desktops and packages. I even found a similar problem here.
It appears to be part of SUSE’s packaging philosophy. It’s still weird for me, while it’s logical to install swaybg when installing sway to enable background images, installing a package like alacritty doesn’t add any benefits to kitty. Having alacritty on the system doesn’t enhance the user experience, add features, or offer improvements inside the kitty terminal. The same applies to sway and hyprland, among others.
First - even before you install - you decide whether you want
a “standard” system as it is defined by openSUSE
a system that contains only the packages you think your system should have
It looks like option 2.) is the one you want to go for. So in the installer you have to de-select the option “install recommended packages” and any package you do not want in your system. Then you start the installation process.
When the installation has finished the very first thing after booting into your newly installed system will be to edit /etc/zypp/zypp.conf and set solver.onlyRequires = true (or start YaST and de-select the option “install recommended packages” again).
And if you are sure that you do not want certain packages ever to be installed in your system you lock them (with zypper ar or YaST) even if those packages are not yet installed (probably you can lock them in the installer already but I have never tried that).
The question is:
Which recommendations are important for which user?
For example, one user finds sway important as a recommendation, the other user doesn’t…
That is definitely a question one should consider very carefully before following the description I gave in post #13.
When I installed my first system in the way I described I found out that many packages which I had considered to be essential to every system had not been installed at all (because the packagers did consider them as recommended only).