Explicitly opt-out from Python name-based provides and obsoletes generators

In Koji, python3-rpm-generators are not installed during the build.
However, packagers can have them installed locally, in mock or in Copr.
This way, we make sure the automatic provides (and obsoletes)
do not magically appear only in some environments.

Since python3-rpm-macros actually requires python-rpm-macros,
the requirement is self-satisfied when the automatic provides are generated.

Related: rhbz#1950291
This commit is contained in:
Miro Hrončok 2022-01-31 11:05:30 +00:00
parent 785aef2702
commit 32385d7b9e

View File

@ -1,6 +1,6 @@
Name: python-rpm-macros
Version: 3.9
Release: 49%{?dist}
Release: 50%{?dist}
Summary: The common Python RPM macros
URL: https://src.fedoraproject.org/rpms/python-rpm-macros/
@ -30,6 +30,12 @@ BuildArch: noarch
# For compileall2.py
Requires: python-srpm-macros = %{version}-%{release}
# The packages are called python(3)-(s)rpm-macros
# We never want python3-rpm-macros to provide python-rpm-macros
# We opt out from all Python name-based automatic provides and obsoletes
%undefine __pythonname_provides
%undefine __pythonname_obsoletes
%description
This package contains the unversioned Python RPM macros, that most
implementations should rely on.
@ -101,6 +107,9 @@ install -m 644 import_all_modules.py %{buildroot}%{_rpmconfigdir}/redhat/
%changelog
* Tue Feb 01 2022 Miro Hrončok <mhroncok@redhat.com> - 3.9-50
- Explicitly opt-out from Python name-based provides and obsoletes generators
* Wed Jan 19 2022 Tomas Orsava <torsava@redhat.com> - 3.9-49
- Add lua helper functions to make it possible to automatically generate
Obsoletes tags