Whenever I install a new package through YaST it always warns me if it is going to pull in some dependencies too. Fine, I always click “accept”.
However, when removing packages it does not warn you if it is going to replace it with something else. In my case this resulted in a broken system.
The NVIDIA driver was not working so I decided to uninstall. Being new to YaST, I clicked on the box until it contained a red cross, then clicked “accept”. This resulted in YaST installing a new kernel so that it could replace the driver with the driver for pre-emptive kernel. I was not warned that this would happen, it just went ahead and did it.
What I do not understand: When installing new packages, YaST warns me if there are any extra dependencies to install, but when removing packages, it may install anything it feels like including a new kernel without asking first. I know that I can check the “summary” to make sure nothing like this is going to happen, but since there is a pop-up window every time I install something with a dependency, surely there should also be a pop-up for when I remove a package and it has decided that this requires installing a new kernel and who knows what else.
If someone could explain what I am missing here I would be very grateful.
Thank you for your quick reply. I did work this out after the first time this happened. I still don’t get why there isn’t a pop-up though. If there is a pop-up for installing dependencies when adding packages, there should definitely also be one for installing stuff when removing packages. Especially since the decisions it makes are very questionable. Surely most people who are removing nvidia driver want to go back to nouveau, not install a different kernel with its own nvidia driver. Perhaps I am nit-picking but I really think that this is somewhat counter-intuitive for a new user like me.
I never played with Nvidia drivers and that thus makes me not completely understanding what happened. I have two, a bit off-topic remarks though:
When in YaST > Software > Software Management and having a list of packages at right, you can choose for deleting a package by right-click on the box and then choosing the red box with the - from the pop-up context menu. Thus no need to get RSI by “clicking on the box until …”.
A third path (I normally do not use) is to select from the list and use the Package menu from the top menu bar.
You should never have a preemptive kernel (except when you have a good reason to want to use it). Thus when you are offered one to be installed, something is wrong. When you have one now, something went wrong (It is not quite clear to me when this happens, but there are threads here of people that run into problems with that) and it should be repaired.
Most likely OP selected kernel drivers for removal leaving user mode components. User mode components require kernel driver so solver attempted to satisfy this dependency by selecting alternate packages that provide kernel driver. Without detailed information about what exact packages were selected for removal and what exact packages were installed further discussion is pointless.
Screenshots of every step in YaST would be helpful as well.
Thanks for your reply. Yes, this is precisely what happened, and I understand why this might be useful sometimes. Although it would probably make more sense if it also removed the other packages which would break, rather than trying to replace the stuff I was removing with alternatives. My only gripe is that there is no modal window to warn about this and I had not got into the habit of checking the installation summary when removing stuff because when installing something, there is always a modal window to warn if something else will be installed too. I will try to make a feature request in the proper channels to ask if this could perhaps be changed, so that the modal window pops up even when uninstalling stuff. That would be more consistent behaviour.
Thanks everyone for your input, this confirms that I was not missing anything.
I do not argue that but to do anything about it developers would need exact reproducer. zypper usually offers several choices between installing alternatives and removal of more packages. I do not have experience with YaST Software which is why I mentioned screenshots.
If you can provide exact steps how to reproduce this, you should open bug report.
While it has already been said that advice can hardly been given without exact details, I felt it hard to believe that YaST did not warn. I have (un-)installed nvidia driver and other packages many times and usually YaST complains about conflicts or missing dependencies. I’d say to install a new kernel is a massive dependency. So I wanted to provoke the YaST Autocheck but instead I reproduced the exact issue: https://paste.opensuse.org/36458491
Choosing to delete nvidia-computeG04 will bring the expected complaint for dependency but deinstalling the kernel module will lead to installation of the preempt kernel module as arvidjaar already suggested. And with it the preempt kernel itself is chosen for installation. See the screenshot. (This may also explain a couple of other “automagical” appearances of the preempt kernel.)
I did not proceed, of course. @saberking: You can reproduce it and open the suggested bug report. Of course you can use the SUSE Paste for reference.
**pluto:~ #** LANG=C zypper rm nvidia-gfxG04-kmp-default
Reading installed packages...
Resolving package dependencies...
The following 4 packages are going to be REMOVED:
nvidia-computeG04 nvidia-gfxG04-kmp-default nvidia-glG04 x11-video-nvidiaG04
4 packages to remove.
After the operation, 366.8 MiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **
That came a little as a surprise. I’d have thought zypper would do the same as YaST but on the contrary it would remove all nvidia packages which is what one would actually expect in the first place, wouldn’t one?
BTW, I am not intending to hit “y” for perfect proof.