Skip to content

Commit 99e7d86

Browse files
committed
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.
1 parent 2ebee9d commit 99e7d86

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

python-rpm-macros.spec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ elseif posix.stat('macros.python-srpm') then
4949
end
5050
}
5151
Version: %{__default_python3_version}
52-
Release: 15%{?dist}
52+
Release: 16%{?dist}
5353

5454
BuildArch: noarch
5555

@@ -58,6 +58,12 @@ BuildArch: noarch
5858
# For compileall2.py
5959
Requires: python-srpm-macros = %{version}-%{release}
6060

61+
# The packages are called python(3)-(s)rpm-macros
62+
# We never want python3-rpm-macros to provide python-rpm-macros
63+
# We opt out from all Python name-based automatic provides and obsoletes
64+
%undefine __pythonname_provides
65+
%undefine __pythonname_obsoletes
66+
6167
%description
6268
This package contains the unversioned Python RPM macros, that most
6369
implementations should rely on.
@@ -145,6 +151,9 @@ install -m 755 brp-* %{buildroot}%{_rpmconfigdir}/redhat/
145151

146152

147153
%changelog
154+
* Mon Jan 31 2022 Miro Hrončok <[email protected]> - 3.10-16
155+
- Explicitly opt-out from Python name-based provides and obsoletes generators
156+
148157
* Tue Dec 21 2021 Tomas Orsava <[email protected]> - 3.10-15
149158
- Add lua helper functions to make it possible to automatically generate
150159
Obsoletes tags

0 commit comments

Comments
 (0)