#492 Reverse weak dependencies
Closed: Fixed None Opened 4 years ago by msuchy.

There was no objection to my mail:
https://lists.fedoraproject.org/pipermail/packaging/2015-January/010417.html
so I'm proposing this change to guidelines.
If approved, it should be likely placed just after
http://fedoraproject.org/wiki/Packaging:Guidelines#Conditional_dependencies

= Weak Dependencies =

Starting from Fedora 22, it is allowed to use reverse [http://www.rpm.org/wiki/PackagerDocs/DependenciesOverview#Weakdependencies weak dependencies]: "Enhances" and "Supplements".

  • Enhances - this should be used when package enhance functionality of other package, but should not be installed by default unless user say so. E.g. package "mod_ssl" enhance functionality of "httpd". Therefore in mod_ssl.spec should be:

{{{ Enhances: httpd }}}

and in this case, if user is installing "httpd" then interactive package manager should ask an user whether he wants to install mod_ssl too. With default action to not install "mod_ssl". Non-interactive package managers can ignore this tag.

  • Supplements - this should be used when package enhance functionality of other package and should be installed by default unless an user disagree. E.g package "Autopano-sift-C" provided by 3rd party repository (not by main Fedora) hugely increase functionality of package "hugin" and they should be installed together. Hower "hugin" can not require "Autopano-sift-C", because it is not provided by Fedora and direct requires would broke dependency. Therefore there should be in Autopano-sift-C.spec:

{{{ Supplements: hugin }}}

and in this case if user is installing "hugin" then interactive package manager should ask an user whether he wants to install "Autopano-sift-C" (if repository with this package is enabled). With default action to install "Autopano-sift-C". Non-interactive package managers should install this package, however not honoring this tag is not an error and ignoring this tag is acceptable behaviour for non-interactive package managers.

Usage of other soft dependencies ("Recommends" and "Suggests") is not allowed for now, but we encourage authors of package management tools to support them, as those tags will be allowed in near future.


We discussed this at today's meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2015-01-15/fpc.2015-01-15-17.00.txt):

  • Very weak deps (Suggests, Enhances) are used as package preference. Target packages will be installed if packages in the transaction requires one of their Provides - no configuration in DNF (it's a hint for depsolver).

  • For dealing with weak deps (Recommends, Supplements) DNF will have configuration option install_weak_deps with allowed values auto/always/never. The auto will be set by default. Auto will install recommended and supplemented packages only if there's no conflict.

From dnf repoquery you will be able query packages by these flags [1].

Interactive mode is not planned nowadays. Maybe in the future.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1184930

During the DevConf discussion (http://developerconference2015.sched.org/event/11e9e2f0e59d450c05b4c56d07d8cfe7?iframe=no) it was said that it'll "just work" in anaconda in the sense that all depsolving is done outside anaconda. The only thing missing would be the '''install_weak_deps''' option equivalent in the UI. Personally, I'm actually in favour of letting the packagers use these weak dependencies in packages, as there were quite a few useful scenarios outlined. I know these scenarios were written down, so hopefully they'll be included as examples in an updated policy proposal.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2015-02-19/fpc.2015-02-19-17.00.txt):

  • 492 Reverse weak dependencies (geppetto, 17:04:37)

  • LINK: https://fedorahosted.org/fpc/ticket/492 (geppetto, 17:04:43)
  • ACTION: Create a real policy in the ticket, probably as a new page
    that is linked to, using the information provided by the dnf
    maintainer. Include examples for packagers, and how to change the
    dnf settings. (geppetto, 17:21:33)
  • ACTION: Also include "normal" weak deps., so we can at least make
    sure they both line up correctly. Although we'll probably vote on
    them separately. (geppetto, 17:22:25)

It's been a month since the meeting. Is there any chance of having a draft we can consider?

Another four weeks have gone by. I'll go ahead and drop this off of our schedule, but please do feel free to reopen if you would like to provide a draft we can consider.

Metadata Update from @tibbs:
- Issue assigned to tibbs

2 years ago

Login to comment on this ticket.

Metadata