Bug 2178129 - dnf5 swap refuse to swap packages for an invalid reason
Summary: dnf5 swap refuse to swap packages for an invalid reason
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf5
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: rpm-software-management
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-14 11:52 UTC by Eva Mrakova
Modified: 2025-06-17 22:46 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-21 14:31:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Eva Mrakova 2023-03-14 11:52:22 UTC
Description of problem:
dnf5 swap dnf5 zsh
refuses to swap the packages when dnf5-plugins is installed and provides confusing error message

Version-Release number of selected component (if applicable):
dnf5-5.0.7-20230314005057.17.g160033cc.fc38.x86_64

How reproducible:
always

Steps to Reproduce:
1. dnf5 -y install dnf5-plugins
2. dnf5 swap dnf5 zsh

Actual results:
# dnf5 swap dnf5 zsh
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem: problem with installed package
  - package dnf5-plugins-5.0.7-20230313005754.13.g8893b905.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230313005754.13.g8893b905.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.7-20230312010106.13.g8893b905.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230312010106.13.g8893b905.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.7-20230311005341.13.g8893b905.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230311005341.13.g8893b905.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.7-20230310010158.9.g69428251.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230310010158.9.g69428251.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.7-20230309010222.0.g13886935.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230309010222.0.g13886935.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230308010238.5.0.5+95.gd51637fd.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230308010238.5.0.5+95.gd51637fd.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230307010450.5.0.5+95.gd51637fd.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230307010450.5.0.5+95.gd51637fd.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230306010025.5.0.5+93.g2f198d77.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230306010025.5.0.5+93.g2f198d77.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230305010712.5.0.5+93.g2f198d77.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230305010712.5.0.5+93.g2f198d77.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230304005752.5.0.5+93.g2f198d77.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230304005752.5.0.5+93.g2f198d77.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230303025047.5.0.5+91.g09a7f0c7.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230303025047.5.0.5+91.g09a7f0c7.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230302010422.5.0.5+91.g09a7f0c7.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230302010422.5.0.5+91.g09a7f0c7.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-0.20230301010623.5.0.5+82.gc6a09ee9.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-0.20230301010623.5.0.5+82.gc6a09ee9.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.6-2.fc38.x86_64 requires dnf5(x86-64) = 5.0.6-2.fc38, but none of the providers can be installed
  - package dnf5-plugins-5.0.7-20230314005057.17.g160033cc.fc38.x86_64 requires dnf5(x86-64) = 5.0.7-20230314005057.17.g160033cc.fc38, but none of the providers can be installed
  - conflicting requests

Expected results:
packages are swapped

Additional info:
* when dnf5-plugins is not installed 'dnf5 swap dnf5 zsh' swaps the packages without any problems
* 'dnf5 remove dnf5' works OK even when dnf5-plugins is installed

Comment 1 Marek Blaha 2023-03-20 15:20:06 UTC
Actually here the behavior is exactly the same as with dnf4.

❯ dnf swap dnf5 acpi
Last metadata expiration check: 1:44:50 ago on Po 20. března 2023, 14:30:34.
Error: 
 Problem: problem with installed package dnf5-plugins-5.0.7-20230313005754.13.g8893b905.fc37.x86_64
  - package dnf5-plugins-5.0.7-20230320005934.38.gae642bd8.fc37.x86_64 requires dnf5(x86-64) = 5.0.7-20230320005934.38.gae642bd8.fc37, but none of the providers can be installed
.
.
.


What you need to do is add `--allowerasing` cmdline option (for both dnf4 and dnf5). But it would be nice if dnf5 could print a hint to the user.

Comment 2 Aoife Moloney 2024-05-07 16:00:27 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2024-05-21 14:31:28 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Evan Goode 2025-06-17 22:46:59 UTC
This issue is still valid. We should print an `--allowerasing` hint.


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