Fix %python_provide when fed python3.10-foo to obsolete python-foo instead of python--foo
This has unlikely broken anything in practice, no packages in Fedora use %python_provide with major.minor-version-prefixed names.
This commit is contained in:
parent
370b825e45
commit
9dff7fbf6a
2 changed files with 7 additions and 3 deletions
|
|
@ -74,6 +74,7 @@
|
|||
local package = rpm.expand("%{?1}")
|
||||
local vr = rpm.expand("%{?epoch:%{epoch}:}%{version}-%{release}")
|
||||
local provides = python.python_altprovides(package, vr)
|
||||
local default_python3_pkgversion = rpm.expand("%{__default_python3_pkgversion}")
|
||||
if (string.starts(package, "python3-")) then
|
||||
for i, provide in ipairs(provides) do
|
||||
print("\\nProvides: " .. provide)
|
||||
|
|
@ -84,14 +85,14 @@
|
|||
print(string.sub(package,9,string.len(package)))
|
||||
print(" < " .. vr)
|
||||
end
|
||||
elseif (string.starts(package, "python" .. rpm.expand("%{__default_python3_pkgversion}") .. "-")) then
|
||||
elseif (string.starts(package, "python" .. default_python3_pkgversion .. "-")) then
|
||||
for i, provide in ipairs(provides) do
|
||||
print("\\nProvides: " .. provide)
|
||||
end
|
||||
--Obsoleting the previous default python package (if it doesn't have isa)
|
||||
if (string.sub(package, "-1") ~= ")") then
|
||||
print("\\nObsoletes: python-")
|
||||
print(string.sub(package,11,string.len(package)))
|
||||
print(string.sub(package,8+string.len(default_python3_pkgversion),string.len(package)))
|
||||
print(" < " .. vr)
|
||||
end
|
||||
elseif (string.starts(package, "python")) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue