Closed dwmarshall closed 5 months ago
This appears to be caused by any package that has a Conflicts
tag in the spec that has the exact same name configured in Provides
. The above curl
package provided above does this:
$ curl -o curl-minimal-7.76.1-23.el9_2.2.x86_64.rpm https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/x86_64/baseos/os/Packages/c/curl-minimal-7.76.1-23.el9_2.2.x86_64.rpm
$ rpm -qp --conflicts curl-minimal-7.76.1-23.el9_2.2.x86_64.rpm
curl
$ rpm -qp --provides curl-minimal-7.76.1-23.el9_2.2.x86_64.rpm
curl = 7.76.1-23.el9_2.2
curl-minimal = 7.76.1-23.el9_2.2
curl-minimal(x86-64) = 7.76.1-23.el9_2.2
And if I make my own package, host it, and then try to reinstall it it fails in the same way. My specfile:
Name: hello
Version: 0.0.1
Release: 1%{?dist}
Summary: Hello World
License: GPL
Source0: %{name}-%{version}.tar.gz
Requires: bash
Conflicts: hello
Provides: hello
%description
A demo RPM build
%prep
%autosetup
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp %{name}.sh $RPM_BUILD_ROOT/%{_bindir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_bindir}/%{name}.sh
%changelog
* Mon Aug 07 2023 Robb Manes <robbmanes@myemail.com>
- First change
And note that plain dnf
or yum
(really yum2
) have no problems, but microdnf
does upon trying to reinstall:
# dnf reinstall /home/rmanes/rpmbuild/RPMS/x86_64/hello-0.0.1-1.el9.x86_64.rpm -y
[...]
Reinstalled:
hello-0.0.1-1.el9.x86_64
# microdnf reinstall hello -y
[...]
error: Error running transaction: hello conflicts with hello-0.0.1-1.el9.x86_64
hello conflicts with (installed) hello-0.0.1-1.el9.x86_64
Works fine with RPM:
# rpm -U --reinstall /root/rpmbuild/RPMS/x86_64/hello-0.0.1-1.el9.x86_64.rpm
Is microdnf using rpmtsAddReinstallElement() here?
Thank you Michal, I think this is the issue.
with regular dnf:
with microdnf: