Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1582939 - RFE: API for turning on/off weak dependencies
Summary: RFE: API for turning on/off weak dependencies
Alias: None
Product: Fedora
Classification: Fedora
Component: libdnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: IoT
TreeView+ depends on / blocked
Reported: 2018-05-27 19:39 UTC by Peter Robinson
Modified: 2020-12-09 06:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-12-04 15:00:42 UTC
Type: Bug

Attachments (Terms of Use)

Description Peter Robinson 2018-05-27 19:39:23 UTC
There's a number of use cases where the install of weak dependencies is not desired.

A lot of security related platforms want the bare minimum installed and want complete control over what's installed so they'd like the ability to turn off weak dependencies.

A few usecases of this are 1) the Fedora cloud images where by default we turn of weak dependencies 2) Container images where the smaller is better 3) Fedora IoT is using rpm-ostree for it's image tech and in creating the images needs complete control over what's installed so if they specify iproute they don't necessarily want iproute-tc too as it pulls in other depenencies.

The atomic requirements have a basic overview in this comment in ticket 718:

Comment 1 Peter Robinson 2018-05-27 19:41:26 UTC
Adding Walters for any further information.

Comment 2 Peter Robinson 2018-05-27 19:41:46 UTC
Related: rhbz #1452348

Comment 3 Daniel Mach 2018-05-28 11:48:16 UTC
This is work in progress.
Libdnf will be handling DNF configs and you'll be able to the 'install_weak_deps' there.

Comment 4 Peter Robinson 2018-07-30 20:44:48 UTC
What's the status of this functionality? Is there a time line?

Comment 5 Igor Raits 2018-08-13 13:43:58 UTC

Comment 6 Jaroslav Mracek 2018-08-21 16:24:18 UTC
The work on LibDnf is in progress.

Comment 7 Peter Robinson 2018-08-22 09:09:24 UTC
(In reply to Jaroslav Mracek from comment #6)
> The work on LibDnf is in progress.

That doesn't provide a timeline. It's basically a non answer.

Comment 8 Colin Walters 2018-08-22 13:42:07 UTC is a PR for rpm-ostree.

I think rpm-ostree is unlikely to parse libdnf config files for server-side composes at least; I'm generally happy with our YAML format now.

As far as a new API, in the end rpm-ostree has since gained some nontrivial bits around depsolving, so we end up talking to the lower level goal API anyways and don't need a high level wrapper.

The main thing is on the client side today, rpm-ostree checks the goal after and makes sure that (by default) package layering isn't trying to remove something from the "base image".  You *can* remove things from the base but it requires a separate `override remove|replace` command.

It's kind of like having every package in the base image be a "protected package" or so.  Perhaps down the line we could try to switch to marking every package like that and return to using a high level libdnf API, but for now this is OK; we're not blocked.

Comment 9 Jaroslav Mracek 2019-03-20 14:52:13 UTC
I believe that this feature is planned for Fedora 33.

Comment 10 Christian Glombek 2020-12-04 12:02:54 UTC
is there an update on this? has it landed in F33 as mentioned above?

Comment 11 Jaroslav Mracek 2020-12-04 15:00:42 UTC
I suggest that the issue is resolved by commandline option for microdnf `--setopt=install_weak_deps=false`. In case that it doesn't work like expected, please feel free to reopen the bug report.

Note You need to log in before you can comment on or make changes to this bug.