From 9677580a8a37ffbd093b50192e1ec05a800968bc Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 24 Oct 2024 02:20:42 +0000 Subject: automatic import of openEuler-rpm-config --- python.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python.lua') diff --git a/python.lua b/python.lua index bd30a85..526878b 100644 --- a/python.lua +++ b/python.lua @@ -10,19 +10,19 @@ -- There is no python-foo -> rule, python-foo packages are version agnostic. -- Returns a table/array with strings. Empty when no rule matched. local function python_altnames(name, only_3_to_3_X) - local xy = rpm.expand('%{__default_python3_pkgversion}') + local xy = rpm.expand('%{python3_version}') local altnames = {} local replaced -- NB: dash needs to be escaped! if name:match('^python3%-') then local prefixes = only_3_to_3_X and {} or {'python-'} for i, prefix in ipairs({'python' .. xy .. '-', table.unpack(prefixes)}) do - replaced = name:gsub('^python3%-', prefix) + replaced = name:gsub('^python3%%-', prefix) table.insert(altnames, replaced) end elseif name:match('^python' .. xy .. '%-') and not only_3_to_3_X then for i, prefix in ipairs({'python-', 'python3-'}) do - replaced = name:gsub('^python' .. xy .. '%-', prefix) + replaced = name:gsub('^python' .. xy .. '%%-', prefix) table.insert(altnames, replaced) end end -- cgit v1.2.3