From Fedora Project Wiki
(Created page with "Hi, I'm suggesting to change scriptlet on the page, to more universal sriptlet: %pretrans -p <lua> -- Due to a bug #447156 paths = {"/usr/share/squid/errors/zh-cn", "/usr/sh...") |
No edit summary |
||
Line 3: | Line 3: | ||
I'm suggesting to change scriptlet on the page, to more universal sriptlet: | I'm suggesting to change scriptlet on the page, to more universal sriptlet: | ||
<pre> | |||
%pretrans -p <lua> | %pretrans -p <lua> | ||
-- Due to a bug #447156 | -- Due to a bug #447156 | ||
Line 21: | Line 23: | ||
end | end | ||
end | end | ||
</pre> | |||
This scriptlet fixes 2 and more symlinks, because array is used, but if you leave just 1 member in array, then the same result as with variable is done. | This scriptlet fixes 2 and more symlinks, because array is used, but if you leave just 1 member in array, then the same result as with variable is done. |
Revision as of 07:37, 7 October 2015
Hi,
I'm suggesting to change scriptlet on the page, to more universal sriptlet:
%pretrans -p <lua> -- Due to a bug #447156 paths = {"/usr/share/squid/errors/zh-cn", "/usr/share/squid/errors/zh-tw"} for key,path in ipairs(paths) do st = posix.stat(path) if st and st.type == "directory" then status = os.rename(path, path .. ".rpmmoved") if not status then suffix = 0 while not status do suffix = suffix + 1 status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) end os.rename(path, path .. ".rpmmoved") end end end
This scriptlet fixes 2 and more symlinks, because array is used, but if you leave just 1 member in array, then the same result as with variable is done.