Handle noarch python sub-packages (bug #1290900)
This commit is contained in:
parent
608a3b9b3b
commit
f16464f0b6
2 changed files with 7 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ CFLAGS="%{optflags}" %{__python} %{py_setup} %{?py_setup_args} install -O1 --ski
|
|||
package = rpm.expand("%{?1:%{1}}");\
|
||||
vr = rpm.expand("%{?epoch:%{epoch}:}%{version}-%{release}")
|
||||
if (string.starts(package, "python2-")) then\
|
||||
if (rpm.expand("%{?buildarch}") != "noarch") then\
|
||||
if (rpm.expand("%{?buildarch}") ~= "noarch") then\
|
||||
str = "Provides: python-" .. string.sub(package,9,string.len(package)) .. "%{?_isa} = " .. vr;\
|
||||
print(rpm.expand(str));\
|
||||
end\
|
||||
|
|
@ -25,7 +25,7 @@ CFLAGS="%{optflags}" %{__python} %{py_setup} %{?py_setup_args} install -O1 --ski
|
|||
print(" = ");\
|
||||
print(vr);\
|
||||
--Obsoleting the previous default python package\
|
||||
if (rpm.expand("%{?buildarch}") != "noarch") then\
|
||||
if (rpm.expand("%{?buildarch}") ~= "noarch") then\
|
||||
str = "\\nObsoletes: python-" .. string.sub(package,9,string.len(package)) .. "%{?_isa} < " .. vr;\
|
||||
print(rpm.expand(str));\
|
||||
end\
|
||||
|
|
@ -35,7 +35,7 @@ CFLAGS="%{optflags}" %{__python} %{py_setup} %{?py_setup_args} install -O1 --ski
|
|||
print(vr);\
|
||||
elseif (string.starts(str, "python" .. rpm.expand("%{python3_pkgversion}") .. "-")) then\
|
||||
--No unversioned provides as python3 is not default\
|
||||
elseif (rpm.expand("%{?python3_other_pkgversion}") != "" and string.starts(str, "python" .. rpm.expand("%{python3_other_pkgversion}") .. "-")) then\
|
||||
elseif (rpm.expand("%{?python3_other_pkgversion}") ~= "" and string.starts(str, "python" .. rpm.expand("%{python3_other_pkgversion}") .. "-")) then\
|
||||
--No unversioned provides as python3_other is not default\
|
||||
elseif (string.starts(package, "pypy-")) then\
|
||||
--No unversioned provides as pypy is not default\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue