Update of libzypp appears to have broken behaviour of solver.onlyRequires = true

For those who don’t want recommended packages installed and use “solver.onlyRequires=true” in “zypp.conf”

Following the recent update of libzypp to 17.15.0-1.2 seems to result in this setting being ignored.

Bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1155105

Interesting.

I have never tried to block recommends, so this won’t bother me. But I am mystified by that new “solver.focus”. It could use some better documentation.

I use it mainly to prevent a plethora of “recommended” font packages being installed. I’m also quite content with US English so the fact that *-lang packs are also excluded is no problem…

But I am mystified by that new “solver.focus”. It could use some better documentation.

Yes indeed…

The only “documentation” I’ve found is from the comments in “zypp.conf”, which outlines roughly what it does but without any real detail. “Googling” also drew a blank…

We might face a change in zypper here. I never cared about avoiding the recommends ( to be honest, main reason is to run apps as they are intended, independent from language etc ). But … in /etc/zypp/zypper.conf there is an option

installRecommends = yes

What happens if you change it to
installRecommends = no
?

Thanks.

Although reading the comment above that option “Default value: follow zypp.conf(solver.onlyRequires)” I guess it may not make any difference .

I’m away from both my TW machines (with the updated libzypp) at the moment - I’ll try changing that tomorrow (20191025) and see what the outcome is.

Package Dependencies
~~~~~~~~~~~~~~~~~~~~
Software packages depend on each other in various ways. Packages usually 'require' or 'recommen
d' other packages, but they can also 'conflict' with them. Packages may support specific hardwa
re or language settings. Zypper uses a 'dependency solver' to find out which packages need to b
e installed to satisfy the user's request.


If you do not request a specific version of a package the solver will pick a reasonable one. Th
e solvers general attitude when resolving a job is to focus on installing the best version of t
he requested package and to add or update dependencies as they are needed. Aside from this 'Foc
us on Job', which is the default, two other focus modes are available:


In 'Focus on Installed' mode the solver focuses on applying as little changes to the installed 
packages as needed. Choosing an older version of a requested package is valid if it's dependenc
ies require less changes to the system. The solver will try to avoid updating already installed
 packages.


In 'Focus on Update' mode the solver focuses on updating the requested package and all its depe
ndencies as much as possible. Beware, installing a single package in this mode may easily lead 
to a mini system update.


For a single command the focus mode can be set using the *--solver-focus MODE* switch. Valid modes are *Job*, *Installed* or *Update*. If you want to change the default mode for your system, set [/etc/zypp/zypp.conf:solver.focus] to the desired value.

OK. Had a chance to try this now.

Using “installRecommends = false” in /etc/zypp/zypper.conf appears to make no difference.

No matter if I use YaST Software Management GUI, command line “zypper in”, or command line “zypper in” with the “–no-recommends” flag.

However in trying that I’ve just noticed another oddity… It’s only 1 of the recommended packages being erroneously installed.

Using “digikam” as the “test” package, as it was that, together with “vlc” where I first noticed the behaviour.

digikam has 3 recommended packages:

paul@Orion-15:~$ sudo zypper info --recommends digikam
Loading repository data...
Reading installed packages...


Information for package digikam:
--------------------------------
Repository     : KDE Extra (Tumbleweed)            
Name           : digikam                           
Version        : 6.3.0-201.5 

...
snip
...

Recommends     : [3]                               
    showfoto
    digikam-lang
    marble

paul@Orion-15:~$

None of which I have installed

If I do a forced reinstall of digikam then:

paul@Orion-15:~$ sudo zypper in -f digikam
Loading repository data...
Reading installed packages...
Forcing installation of 'digikam-6.3.0-201.5.x86_64' from repository 'KDE Extra (Tumbleweed)'.
Resolving package dependencies...

The following NEW package is going to be installed:
  digikam-lang

The following package is going to be reinstalled:
  digikam

1 new package to install, 1 to reinstall.
Overall download size: 86.2 MiB. Already cached: 0 B. After the operation, additional 22.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):

zypper proposes:

The following NEW package is going to be installed:
digikam-lang

If, having aborted that install, I then repeat with “–no-recommends”

paul@Orion-15:~$ sudo zypper in --no-recommends -f digikam
Loading repository data...
Reading installed packages...
Forcing installation of 'digikam-6.3.0-201.5.x86_64' from repository 'KDE Extra (Tumbleweed)'.
Resolving package dependencies...

The following NEW package is going to be installed:
  digikam-lang

The following package is going to be reinstalled:
  digikam

1 new package to install, 1 to reinstall.
Overall download size: 86.2 MiB. Already cached: 0 B. After the operation, additional 22.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):

again zypper proposes:

The following NEW package is going to be installed:
digikam-lang

What zypper is (correctly) not proposing to install are the 2 other recommended packages…

So why just the language pack.

If I repeat the above on a leap 15.1 system (pre libzypp changed behaviour) then no recommended packages are (correctly) not installed.

Confused… :\

I cannot reproduce it on 20191022. But I also do not have any extra repositories, just standard TW.

So…

Switched digikam to the standard TW repo and temporarily disabled KDE:Extra

paul@Orion-15:~$ sudo zypper info --recommends digikam
[sudo] password for root: 
Loading repository data...
Reading installed packages...


Information for package digikam:
--------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : digikam                
Version        : 6.3.0-2.2              
Arch           : x86_64                 
Vendor         : openSUSE               
Installed Size : 99.8 MiB               
Installed      : Yes                    
Status         : up-to-date             
Source package : digikam-6.3.0-2.2.src  
Summary        : A KDE Photo Manager    
Description    :                        
    digiKam is a simple digital photo management application for KDE, which
    allows you to import and organize your digital photos easily. The
    photos can be organized in albums, which can be sorted chronologically,
    by directory layout, or by custom collections. An easy-to-use interface
    that enables you to connect to your camera and preview, download, or
    delete your images, is provided.
Recommends     : [3]                    
    marble
    showfoto
    digikam-lang

paul@Orion-15:~$

And… zypper still wants to install the (recommended) digikam-lang package:

paul@Orion-15:~$ sudo zypper in -f digikam
[sudo] password for root: 
Loading repository data...
Reading installed packages...
Forcing installation of 'digikam-6.3.0-2.2.x86_64' from repository 'openSUSE-Tumbleweed-Oss'.
Resolving package dependencies...

The following NEW package is going to be installed:
  digikam-lang

The following package is going to be reinstalled:
  digikam

1 new package to install, 1 to reinstall.
Overall download size: 86.1 MiB. Already cached: 0 B. After the operation, additional 22.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n
paul@Orion-15:~$

More confused ::\

An afterthought…

And I’m hesitant to ask you this as you’re far more knowledgable than I, but…

You did uninstall the digikam-lang package before trying to reproduce the issue ?

I do not have anything of KDE installed at all.

Run “zypper in --debug-solver --no-recommends digikam” and provide resulting archive (it is directory actually). You will need it for bug report anyway.

# inxi -S
System:    Host: gx62b Kernel: 5.2.14-1-default x86_64 bits: 64 Desktop: KDE Plasma 5.17.0
           Distro: openSUSE Tumbleweed 20191023
#  egrep -i 'llRec|yRequires =|ver.foc' /etc/zypp/zyp*f
/etc/zypp/zypp.conf: solver.focus = Installed
/etc/zypp/zypp.conf: solver.onlyRequires = true
/etc/zypp/zypper.conf:# installRecommends = yes
# zypper ll | grep ang
# zypper in digikam
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 31 NEW packages are going to be installed:
  akonadi-contact digikam digikam-plugins lensfun-data libKF5AkonadiContact5 libKF5ContactEditor5
  libMagick++-7_Q16HDRI4 libQt5XmlPatterns5 libQtAV1 libQtAVWidgets1 libSDL2-2_0-0 libastro1 libavdevice58
  libavfilter7 libavresample4 libbs2b0 libdigikamcore6 libjack0 liblensfun1 liblilv-0-0 libmarblewidget-qt5-28
  libmysofa0 libopencv4_1 libpgm-5_2-0 librubberband2 libserd-0-0 libsodium23 libsord-0-0 libsratom-0-0 libzimg2
  libzmq5

31 new packages to install.
Overall download size: 109.7 MiB. Already cached: 0 B. After the operation, additional 208.9 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n
#

Hmm… Thanks guys.

The only immediate difference I see is I’ve not changed solver.focus, it’s using ‘Focus on Job’, which is the default. Also yours is a ‘fresh’ install whereas I already have digikam installed.

I don’t have time to pursue this at the moment, I’ll pick up again probably on Monday. One thing I do need to try first is to downgrade libzypp to see if that was indeed the cause of this.

From a reply to the bug report: ( 1155105 – solver.onlyRequires=true being ignored after update of libzypp to 17.15.0-1.2 )

It is true that digikam recommends digikam-lang, but this way the package is not injected (due to solver.onlyRequires).

But digikam-lang itself claims to add language support for digicam (see: zypper info --supplements digikam-lang). Most propably one of the supplemented locales matches one, the system is configured to support (see: zypper locales).

So it’s the requested language support that adds digikam-lang, not the digicam package.

What I don’t understand is why this wasn’t happening prior to the libzypp update… :\

I guess the easiest “solution” is just to lock the *-lang packages.