diff options
| author | CoprDistGit <infra@openeuler.org> | 2024-10-24 02:20:42 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2024-10-24 02:20:42 +0000 | 
| commit | 9677580a8a37ffbd093b50192e1ec05a800968bc (patch) | |
| tree | fb57ce445b31567c59c0a21a6996d58d0b2436ee | |
| parent | 435460438cf478ab8f012c23b4862779c54a46b5 (diff) | |
automatic import of openEuler-rpm-config
| -rw-r--r-- | python.lua | 6 | 
1 files changed, 3 insertions, 3 deletions
@@ -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  | 
