Bug 2225014

Summary: dnf5 fails to install locally built RPMs due to "conflicting requests"
Product: [Fedora] Fedora Reporter: Frantisek Sumsal <fsumsal>
Component: dnf5Assignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: amatej, jkolarik, nsella, pkratoch, rpm-software-management
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-25 06:15:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frantisek Sumsal 2023-07-24 09:04:40 UTC
Since dnf5 landed in Rawhide one of our systemd+SELinux jobs started failing when installing the just built selinux-policy RPMs. However, the same transaction works as expected when run with dnf-3:

# rpm -q dnf5 python3-dnf
dnf5-5.1.0-1.fc39.x86_64
python3-dnf-4.16.1-3.fc39.noarch

# dnf install -y selinux-policy fedpkg

## Rebuild selinux-policy
# fedpkg clone -a selinux-policy
# pushd selinux-policy
# dnf -y builddep selinux-policy.spec
# ./make-rhat-patches.sh
# fedpkg local

# dnf install --assumeno noarch/selinux-policy-*
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
Problem 1: problem with installed package 
  - cannot install both selinux-policy-38.20-1.fc39.noarch and selinux-policy-38.21-2.fc39.noarch
  - conflicting requests
 Problem 2: problem with installed package 
  - cannot install both selinux-policy-devel-38.20-1.fc39.noarch and selinux-policy-devel-38.21-2.fc39.noarch
  - conflicting requests
 Problem 3: problem with installed package 
  - cannot install both selinux-policy-targeted-38.20-1.fc39.noarch and selinux-policy-targeted-38.21-2.fc39.noarch
  - conflicting requests

# dnf-3 install --assumeno noarch/selinux-policy-*
Last metadata expiration check: 0:09:02 ago on Mon Jul 24 08:50:12 2023.
Dependencies resolved.
===================================================================================================================================
 Package                                 Architecture           Version                         Repository                    Size
===================================================================================================================================
Installing:
 selinux-policy-doc                      noarch                 38.21-2.fc39                    @commandline                 2.3 M
 selinux-policy-minimum                  noarch                 38.21-2.fc39                    @commandline                 6.5 M
 selinux-policy-mls                      noarch                 38.21-2.fc39                    @commandline                 4.2 M
 selinux-policy-sandbox                  noarch                 38.21-2.fc39                    @commandline                  46 k
Upgrading:
 selinux-policy                          noarch                 38.21-2.fc39                    @commandline                  50 k
 selinux-policy-devel                    noarch                 38.21-2.fc39                    @commandline                 1.2 M
 selinux-policy-targeted                 noarch                 38.21-2.fc39                    @commandline                 6.5 M
Installing dependencies:
 mcstrans                                x86_64                 3.5-1.fc39                      rawhide                      153 k
 policycoreutils-newrole                 x86_64                 3.5-4.fc39                      rawhide                       26 k

Transaction Summary
===================================================================================================================================
Install  6 Packages
Upgrade  3 Packages

Total size: 21 M
Total download size: 180 k
Operation aborted.

Reproducible: Always

Comment 1 amatej 2023-07-25 06:15:58 UTC
I think this is because of the switch of `allow_vendor_change` default configuration to false.
This has since been reverted: https://github.com/rpm-software-management/dnf5/pull/745
It should start working again once released.

In the meantime you can do `--setopt=allow_vendor_change=true` to workaround it.

*** This bug has been marked as a duplicate of bug 2219624 ***