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: 38
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: 2023-03-21 06:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
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.


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