harbour-storeman icon indicating copy to clipboard operation
harbour-storeman copied to clipboard

Installing recommended packages

Open nobodyinperson opened this issue 6 years ago • 5 comments

Currently, it is not possible to install packages listed in the Recommends SPEC-file section via Storeman. An option to (try to) install as many of the recommended packages would be very useful from a packaging point of view: Packages adding features to an application but known to be not installable on some systems are usually put into the Recommends section. With an option to also install recommended packages, the user wouldn't need to be instructed to install package X and Y manually for this or that feature.

I'd welcome such a feature for Hasher and OpenSenseFish for example, but I suppose a lot of other developers would benefit from that.

That being said (and me knowing nothing about PackageKit), this might as well not be possible with PackageKit. pkcon at least doesn't seem to offer such functionality. zypper does, however.

nobodyinperson avatar Nov 14 '19 07:11 nobodyinperson

Could you test who this works on suse with newer libzypp and packagekit?

Thaodan avatar May 14 '20 01:05 Thaodan

~~Because Recommends: has always been a no-op~~ on SailfishOS most packages do not use it. Edit: See next message for details.

But RPM recommends that the Recommends: weak dependency is ignored by simple command line tools (as rpm), while GUI tools and advanced command line tools might offer the choice to install the recommended packages (usually by an interactive dialogue). Recommends: needs rpm ≥ 4.13 (to be recognised as a keyword) and SFOS 3.2.1 already deploys v4.14.1.

Olf0 avatar Mar 17 '22 00:03 Olf0

~~Because Recommends: has always been a no-op~~ on SailfishOS most packages do not use it.

This is not the case for libzypp, when configured so (see solver.onlyRequires configuration option in /etc/zypp/zypp.conf, which defaults to install recommended packages, in contrast to rpm, which can query Recommends weak dependencies since v4.13, but not utilise them) and consequently frontends which use it: zypper and pkcon.
zypper additionally allows to override the behaviour defined for libzypp by configuration or the options --recommends and --no-recommends.

Now I wonder, why Storeman, which uses packagekitd via D-Bus does not seem to install recommended packages.

An explanation or a PR (e.g. making this behaviour user-configurable) is very welcome.

Olf0 avatar Feb 28 '24 17:02 Olf0

An explanation or a PR (e.g. making this behaviour user-configurable) is very welcome.

I haven't tested my idea but I assume that setting the option in zypp.conf, then install a package which has recommends over packagekit should work with the recommends installed.

Setting "the" option would only be possible by writing zypp.conf.

Thaodan avatar Feb 29 '24 00:02 Thaodan

I haven't tested my idea but I assume that setting the option in zypp.conf, then install a package which has recommends over packagekit should work with the recommends installed.

??? From SailfishOS 3.2.1 installation's /etc/zypp/zypp.conf (this part is equivalent to upstream):

## 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 = false

I.e. the default true is unaltered by SailfishOS' zypp.conf. BTW, otherwise your statement "Recommends is not merely a hint to the user, pkcon or zypper can handle them and pull recommends by default." would not be true on SailfishOS.

Olf0 avatar Feb 29 '24 03:02 Olf0