Hello,
I need to install the fpdf python module for an existing script. I think that I need the package is “python311-fpdf2”.
When trying to install it, zypper wants to install 296 packages (930 MiB).
To me it seems excessive that a single python module needs so many dependencies (half of them have ghc prefix, so they are related to haskell) so I’m thinking that maybe some packet has a bug in its list of dependencies . But on the other hand am not very familiar with openSUSE so i could have wrong expectations .
The attached image shows the dependencies required by python311-fpdf2 . Do you find it normal ?
ich@laptopneu:~> LANG=C sudo zypper in --no-recommends python311-fpdf2
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 10 NEW packages are going to be installed:
python311-FontTools python311-Pillow python311-appdirs python311-defusedxml python311-fpdf2 python311-fs python311-olefile python311-pytz python311-setuptools python311-six
10 new packages to install.
Package download size: 7.2 MiB
Package install size change:
| 35.4 MiB required by packages that will be installed
35.4 MiB | - 0 B released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):
Many thanks for sharing the knowledge about the “–no-reccomends” . Wow , I had no idea that sometimes I have installed optional packages that were not strictly needed.
Is there a zypper command (or option) that can display separately the required and the reccomended dependencies separately , in order to have a basis for deciding whether to use ‘–no-reccomends’ ?
If you are the person that thinks it is wise to keep the number of packages as low as possible, you can set “–no-reccomends” in zypp.conf:
$ man zypper
...
--no-recommends
Do not install recommended packages, but only required ones. The default behavior is determined by [zypp.conf:solver.onlyRequires].
You might als like to try “sudo zypper packages --unneeded” but be careful, there is a reasonable chance that packages you see are still needed.
“man zypper” will give the arguments you need for the info command, for dolphin this are the recommendations.
...
Summary : KDE File Manager
Description :
This package contains the default file manager of KDE Workspaces.
Recommends : [2]
konsole-part
kio-extras6
It will only list direct dependencies (so to see all the packages that would be installed you need to repeat it for each required/recommended package) and it will show the “provides” (i.e. more or less opaque strings), not the packages providing them. You still need to find out what packages provide the required or recommended strings.
The easiest way to see what packages would be pulled in by zypper is zypper install.
Hm, no, i don’t want to disable the reccomendations completely.
As far as I can see “zypper info --recommends” is not recursive, so it would be tedious to manually run the info command again and again for each recommended package .
My conclusion is that i should run "zypper install " and “zypper install --no-recommends” (without approving the install) and do a quick visual comparision.
This is good to know for the next time : I have already executed a ‘dup’ yesterday …
Apparently I’ve been lucky and it hasn’t installed all those extra packages :
the update was just extra 200MB and I don’t see any of the ‘ghc-*’ packages.
zypper does not install missing dependencies unless they are needed by a to be installed (updated) package. That is the reason why zypper install-new-recommends exists.