Zypper Dependency Handling on openSUSE 13.1 x64

When updating the system or installing software with YaST2, it will allow you to uncheck dependencies such as language packs, and these selections will display a dotted line underneath. Some of the selections with a dotted line underneath can be deselected, and others can’t. What signifies to the user which dependency packages are able to be unchecked without trying every single one? I’m assuming if it can be unchecked without a dependency warning message coming up, it isn’t absolutely necessary to install. Also, on the topic of installing something or updating the system minus unchecked dependencies which were allowed to not be installed, how can you get those back at a later time? Is there a file that can be cleared out?

There are 2 options which you can set if you were to instruct zypper not to install recommends.


## Whether required packages are installed ONLY
## So recommended packages, language packages and packages which depend
## on hardware (modalias) will not be regarded.
## Valid values: boolean
## Default value: false
solver.onlyRequires = true


## Do not install soft dependencies (recommended packages)
## Valid values: boolean
## Default value: yes
installRecommends = no

Note that any pattern you might have installed can pull dependencies regardless.
Also note that some packages have forced dependencies which cannot be disabled with zypper.
RPM option --nodeps should take care of that, but this sometimes renders the package unusable.

This still doesn’t answer my question as to how to get Zypper to install dependencies after deselecting them in YaST. For example, I can deselect language packs. What if I want Zypper to detect which unselectable dependences were deselected at a later time, and automatically install those?

You need a clairvoyant app for that. You want it to show dependencies for stuff you uninstalled??? Really how is that supposed to work??

You can see dependencies in Yast for a given package select dependencies in the tabs bottom right.

You can also see the package history from Yast

“zypper inr” maybe? (inr = install-recommends)
Or just enter YaST and deselect “Ignore recommended packages for already installed packages” in the “Options” menu.
It should then select those packages again automatically.

This is not true if you uninstalled them explicitely though, just if you deselected them.
YaST doesn’t remember what packages you selected or deselected.
But it will remember which one you installed (obviously, well actually rpm does that… :wink: ) and uninstalled (it won’t try to install them again automatically, this has been changed in Factory recently though and will not be true anymore in 13.2).

What I’m wondering is if Zypper is capable of automatically scanning for dependencies which a user may have deselected at an earlier time. For instance, a user changed his/her mind about a deselectable package that was deselected when installing a particular piece of software, and wants that package at a later time without trying to guess which ones were deselected.

No. As I wrote, zypper does not care (and does not remember) what packages you ever selected or deselected.

But it can scan all installed packages and install all packages that are recommended by those, regardless whether you deselected them earlier.
That’s what the “inr” (install-new-recommends) command does.

Whether this is done by default is influenced by the option “solver.onlyRequires”, and zypper’s “installRecommends” (“Ignore recommended packages for already installed packages” in YaST) as mentioned earlier.