openSUSE / zypper

World's most powerful command line package manager
http://en.opensuse.org/Portal:Zypper
Other
412 stars 113 forks source link

Some namespaced recommends or supplements are still considered even with `--no-recommends` #517

Closed adrienclerc closed 1 year ago

adrienclerc commented 1 year ago

Hi, I've been recently hit by the following:

I strongly needed the nvidia-driver-… package not to be installed in the first place. They brought kernel-devel with it, a compiler, a 10 minutes long compilation, and in the end, what really works is the nouveau driver for my setup.

I spent a two work days finding that nvidia-driver-… have a Supplements section with PCI IDs matching the installed hardware. I am expecting that --no-recommends doesn't consider packages with matching Supplements packages, as it is a backward weak dependency.

This was very long to understand, giving the fact that zypper does show why a recommended package is installed (using The following recommended packages will be installed… sentence), but not why a supplemented package is installed: it just feels like it's a hard requirement. But for this issue, I would to like to ask either:

mlandres commented 1 year ago

Namespace dependencies indicating support for specific aspects (namespace:modalias for hardware, :language for requested locales, :filesystem ...) are treated specially by the resolver, no matter in which section the are defined. Ordinary supplements are ignored by --no-recommends.

Not installing the drivers usually leads to complaints, that's why they are not affected by the recommends switches. If you don't want the driver to be installed , you need to lock the packages (e.g. zypper al 'nvidia*driver*').

adrienclerc commented 1 year ago

OK, that makes more sense to me now. This seems to be the lack of documentation that leads me to think a bad behavior. Ignoring such namespaces would require "advanced" flag, I'm not sure it would be a solution…

Regarding drivers, I guess I know why not installing leads to complaints :smiley: And I'm sure I'm not the first to complain about nvidia drivers… I think we will stick with a locked packages solution for now. Thanks for your quick and precious answer!