From 34d14091784c508be9a0b451fdd97d468bad016c Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Apr 14 2024 15:11:20 +0000 Subject: Move the removal of multilibs to %pre --- diff --git a/glibc.spec b/glibc.spec index 85933e8..d7d47dc 100644 --- a/glibc.spec +++ b/glibc.spec @@ -2224,13 +2224,11 @@ if rpm.vercmp(rel, required) < 0 then error("FATAL: kernel too old", 0) end -%post -p -%glibc_post_funcs -- (1) Remove multilib libraries from previous installs. -- In order to support in-place upgrades, we must immediately remove --- obsolete platform directories after installing a new glibc +-- all platform directories before installing a new glibc -- version. RPM only deletes files removed by updates near the end --- of the transaction. If we did not remove the obsolete platform +-- of the transaction. If we did not remove all platform -- directories here, they may be preferred by the dynamic linker -- during the execution of subsequent RPM scriptlets, likely -- resulting in process startup failures. @@ -2303,7 +2301,9 @@ for _, rdir in ipairs (remove_dirs) do end end --- (2) Update /etc/ld.so.conf +%post -p +%glibc_post_funcs +-- (1) Update /etc/ld.so.conf -- Next we update /etc/ld.so.conf to ensure that it starts with -- a literal "include ld.so.conf.d/*.conf". @@ -2342,14 +2342,14 @@ if posix.access (ldsoconf) then end end --- (3) Rebuild ld.so.cache early. +-- (2) Rebuild ld.so.cache early. -- 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. call_ldconfig() --- (4) Update gconv modules cache. +-- (3) Update gconv modules cache. -- If the /usr/lib/gconv/gconv-modules.cache exists, then update it -- with the latest set of modules that were just installed. -- We assume that the cache is in _libdir/gconv and called @@ -2357,7 +2357,7 @@ call_ldconfig() update_gconv_modules_cache() --- (5) On upgrades, restart systemd if installed. "systemctl -q" does +-- (4) On upgrades, restart systemd if installed. "systemctl -q" does -- not suppress the error message (which is common in chroots), so -- open-code rpm.execute with standard error suppressed. if tonumber(arg[2]) >= 2