From Fedora Project Wiki
(Add note about possible update of documentation)
(Change name of proposal with a summary)
Line 1: Line 1:
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->


= Enable exclude_from_weak_autodetect by default in LIBDNF =
= Install only newly recommended packages on upgrades with dnf/PackageKit/microdnf =
<!-- The name of your change proposal -->
<!-- The name of your change proposal -->


== Summary ==
== Summary ==
exclude_from_weak_autodetect enables autodetection of unmet weak dependencies (Recommends or Supplements) of installed packages and blocks installation of packages satisfying already unmet dependencies. In other words: When you don't have the recommended package installed, it won't be automatically installed with future upgrades of the recommending package.
We would like to change a default behavior dnf/PackageKit/microdnf to install only newly recommended packages on upgrades. Internally we will change `exclude_from_weak_autodetect` configuration option to `True`. exclude_from_weak_autodetect enables autodetection of unmet weak dependencies (Recommends or Supplements) of installed packages and blocks installation of packages satisfying already unmet dependencies. In other words: When you don't have the recommended package installed, it won't be automatically installed with future upgrades of the recommending package.


<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->
<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release. Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->

Revision as of 06:09, 6 October 2021


Install only newly recommended packages on upgrades with dnf/PackageKit/microdnf

Summary

We would like to change a default behavior dnf/PackageKit/microdnf to install only newly recommended packages on upgrades. Internally we will change exclude_from_weak_autodetect configuration option to True. exclude_from_weak_autodetect enables autodetection of unmet weak dependencies (Recommends or Supplements) of installed packages and blocks installation of packages satisfying already unmet dependencies. In other words: When you don't have the recommended package installed, it won't be automatically installed with future upgrades of the recommending package.


Owner


Current status

  • Targeted release: Fedora 36
  • Last updated: 2021-10-06
  • FESCo issue: #2667
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

The feature is designed to prevent an install of removed weak dependencies from the system by users and to not install weak dependencies missing after system deployment. It will change the behavior of DNF, microdnf, and PackageKit. The feature will be backported to all Fedoras (34+), but in default, the feature (autodetection) will be off (exclude_from_weak_autodetect=false). The request is to enable autodetection in Fedora 36+ (exclude_from_weak_autodetect=true). Additional information: https://bugzilla.redhat.com/show_bug.cgi?id=1699672

The default value for exclude_from_weak_autodetect configuration can be overridden in /etc/dnf/dnf.conf


Feedback

The feature was requested by Miro Hrončok and supported by many others: See rhbz#1699672 for more feedback.

Benefit to Fedora

After the installation of a fresh system, the first upgrade will not install a lot of weak dependencies. Some of them were excluded from the kick-start installation set for good reasons (security, image size, minimal functional set, ...), but after the first update, all weak dependencies are installed, therefore some features of deployment simply disappear.


Scope

  • Proposal owners:
    • The feature is ready in Pull Request - https://github.com/rpm-software-management/libdnf/pull/1279
    • PRs only wait for a release of libsolv
    • The Feature will be enabled in upstream as default, therefore from Fedora 36, we start to release libdnf without a revert patch of default in comparison to upstream.
  • Other developers:

The change requires a new release of libsolv.

No coordination required.

  • Policies and guidelines: A packaging guideline should be added that discourages or forbids weak dependencies on fully versioned (sub)packages (see the details).
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:

Upgrade/compatibility impact

No manual changes will be required. After the libdnf update, this feature will be on by default.


How To Test

1. Install package without satisfied weak dependencies 2. Upgrade the upgrade. With exclude_from_weak_autodetect=true, it will not install weak dependencies of already installed packages. With exclude_from_weak_autodetect=false, weak dependencies will be installed during upgrades.


User Experience

The change in default will help to keep some values for particular deployments (a minimal system will be still minimal without disabling weak dependencies). Users will be able to remove particular weak dependencies and they will be not installed on the first upgrade. In case when the feature will not work according to the user expectation it can be switched off in the dnf configuration file.


Dependencies

Requires libsolv-0.7.20


Contingency Plan

There are no external dependencies, therefore we can easily postpone the feature and the change of default behavior.

  • Contingency mechanism: (What to do? Who will do it?) N/A (not a System Wide Change)
  • Contingency deadline: beta freeze
  • Blocks release? N/A (not a System Wide Change), Yes/No

Documentation

The feature will be documented in dnf man pages.

It would be also nice from community to document the feature in https://docs.fedoraproject.org/en-US/packaging-guidelines/WeakDependencies/ .



Release Notes