Bug 1734081 - No way to ignore "is excluded" packages
Summary: No way to ignore "is excluded" packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.4
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Jaroslav Mracek
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-29 14:50 UTC by Richard W.M. Jones
Modified: 2020-04-28 16:49 UTC (History)
4 users (show)

Fixed In Version: dnf-4.2.11-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:48:04 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:49:03 UTC

Description Richard W.M. Jones 2019-07-29 14:50:08 UTC
Description of problem:

I'm doing some local testing of the upgrade path and want to
test upgrading a package which is normally in a module.  I have
built my own local repo, but I still can't get dnf to upgrade
the package:

# cat /etc/yum.repos.d/TEST.repo
[TEST]
name=TEST
baseurl=file:///var/tmp/p/n12
enabled=1
gpgcheck=0

# dnf install nbdkit-server --enablerepo=TEST --disableexcludes=all --disableexcludepkgs=all
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:05:18 ago on Mon 29 Jul 2019 15:41:20 BST.
Error: 
 Problem: problem with installed package nbdkit-1.4.2-5.module+el8.0.0+3748+44021654.x86_64
  - package nbdkit-server-1.12.1-2.el8.x86_64 conflicts with nbdkit < 1.12 provided by nbdkit-1.4.2-5.module+el8.0.0+3748+44021654.x86_64
  - package nbdkit-server-1.12.1-2.el8.x86_64 conflicts with nbdkit < 1.12 provided by nbdkit-1.4.2-5.module+el8.1.0+3531+2918145b.x86_64
  - conflicting requests
  - package nbdkit-1.12.1-2.el8.x86_64 is excluded
  - package nbdkit-1.4.2-5.module+el8.0.0+3748+44021654.x86_64 is excluded
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

There should be a "just do it" option to kill excludes.

Version-Release number of selected component (if applicable):

dnf-4.2.6-1.el8.noarch

How reproducible:

100%

Steps to Reproduce:
1. See above.

Comment 1 Petr Pisar 2019-07-29 14:57:35 UTC
Set module_hotfixes=True to the repository configuration. Otherwise modular packages of the same name will overlay your packages.

Alternatively add a modulemd for your locally built module into the YUM metadata of the repository so that DNF recognizes the packages as part of the module stream.

Comment 2 Richard W.M. Jones 2019-07-29 15:15:03 UTC
(In reply to Petr Pisar from comment #1)
> Set module_hotfixes=True to the repository configuration. Otherwise modular
> packages of the same name will overlay your packages.

Can confirm this works, thanks.  Is this documented somewhere?  It's not
part of the dnf man page.

Comment 3 Petr Pisar 2019-07-29 15:40:43 UTC
dnf.conf(5) from dnf-data-4.2.7-2.el8.noarch documents module_hotfixes configuration option. But it's true than DNF does not document that packages from an active module stream overlays nonmodular packages.

Comment 4 Jaroslav Mracek 2019-08-05 13:27:03 UTC
Additional information can be found with `man dnf.modularity` (Requires dnf-4.2.7).

Repo configuration module_hotfixes=True could be adjust from a command-line for a particular repository `--setopt=<repoid>.module_hotfixes=True` or for all repositories using `--setopt=*.module_hotfixes=True` (Requires dnf-4.2.7).

Man pages were enhanced by https://github.com/rpm-software-management/dnf/commit/d2c509a2c7ff2db59670d083b06d4479e96451d3

Comment 5 Petr Pisar 2019-08-05 13:57:14 UTC
dnf.modularity(7) should be linked from dnf(8). Preferably from the Module Command section.

Comment 6 Jaroslav Mracek 2019-08-06 07:28:56 UTC
Links will be added by https://github.com/rpm-software-management/dnf/pull/1453.

Comment 7 Etienne CHAMPETIER 2019-09-27 02:54:13 UTC
Adding module_hotfixes=True fixed my issue installing docker-ce on CentOS 8

The error was: (to help google)

# yum install docker-ce
Failed to set locale, defaulting to C
Last metadata expiration check: 0:03:21 ago on Thu Sep 26 22:00:05 2019.
Error: 
 Problem: package docker-ce-3:19.03.2-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Comment 8 Jaroslav Mracek 2019-09-27 05:29:57 UTC
I must mentioned that using module_hotfixes=True is a dangerous override that could easily destroy your system. It allows combination of packages that were built in completely different environment or with incompatible setting.

Comment 13 errata-xmlrpc 2020-04-28 16:48:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823


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