remove bicycle from lua code

https://rpm-software-management.github.io/rpm/manual/lua
This commit is contained in:
Mikhail Novosyolov 2023-01-11 01:19:12 +03:00
parent 258bf20f6a
commit 6fa740818f

View file

@ -125,23 +125,13 @@
-- https://github.com/projectatomic/rpm-ostree/pull/1869 \
-- If we add new lua actions to the %%post code we should coordinate \
-- with rpm-ostree and ensure that their glibc install is functional. \
function post_exec (program, ...) \
local pid = posix.fork () \
if pid == 0 then \
posix.exec (program, ...) \
assert (nil) \
elseif pid > 0 then \
posix.wait (pid) \
end \
end \
\
function update_gconv_modules_cache () \
local iconv_dir = "%{_libdir}/gconv" \
local iconv_cache = iconv_dir .. "/gconv-modules.cache" \
local iconv_modules = iconv_dir .. "/gconv-modules" \
if (posix.utime (iconv_modules) == 0) then \
if (posix.utime (iconv_cache) == 0) then \
post_exec ("%{_sbindir}/iconvconfig", \
rpm.execute ("%{_sbindir}/iconvconfig", \
"-o", iconv_cache, \
"--nostdlib", \
iconv_dir) \
@ -438,8 +428,10 @@ end
-- If the format of the cache changes then we need to rebuild
-- the cache early to avoid any problems running binaries with
-- the new glibc.
-- Note: We use _prefix because Fedora's UsrMove says so.
post_exec ("/sbin/ldconfig")
-- "-v" here for debugging (maybe remove it later)
if not rpm.execute("/sbin/ldconfig", "-v") then
io.stdout:write ("Error: call to /sbin/ldconfig failed.\n")
end
-- (4) Update gconv modules cache.
-- If the /usr/lib/gconv/gconv-modules.cache exists, then update it