mirror of
https://abf.rosa.ru/djam/glibc40.git
synced 2025-02-24 00:02:53 +00:00
Run ldconfig right after files appear, not in the end of transaction
It is interesting how it worked without this before... And how it works in Fedora with transaction-only triggers. Probably libraries in /usr/lib64 are found always, even without runs of ldconfig, but libraries in non-standard directories like /lib64 now, after update to 2.36 and merging /usr, are not.
This commit is contained in:
parent
6fa740818f
commit
bcda4c1026
1 changed files with 17 additions and 5 deletions
22
glibc.spec
22
glibc.spec
|
@ -150,7 +150,7 @@ Version: 2.36
|
|||
#Source0: http://ftp.gnu.org/gnu/glibc/%{oname}-%{version}.tar.xz
|
||||
# use ./upd.sh to make a tarball and automatically update Release
|
||||
Source0: glibc-%{commit}.tar.xz
|
||||
Release: 4.git%{commit_short}.2
|
||||
Release: 4.git%{commit_short}.3
|
||||
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
|
||||
Group: System/Libraries
|
||||
Url: http://www.gnu.org/software/libc/
|
||||
|
@ -428,8 +428,7 @@ 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.
|
||||
-- "-v" here for debugging (maybe remove it later)
|
||||
if not rpm.execute("/sbin/ldconfig", "-v") then
|
||||
if not rpm.execute("/sbin/ldconfig") then
|
||||
io.stdout:write ("Error: call to /sbin/ldconfig failed.\n")
|
||||
end
|
||||
|
||||
|
@ -457,10 +456,23 @@ then
|
|||
end
|
||||
|
||||
%transfiletriggerin -p <lua> -P 2000000 -- /lib /lib64 /usr/lib /usr/lib64 /etc/ld.so.conf.d
|
||||
os.execute("/sbin/ldconfig -X")
|
||||
rpm.execute("/sbin/ldconfig", "-X")
|
||||
|
||||
%transfiletriggerpostun -p <lua> -P 2000000 -- /lib /lib64 /usr/lib /usr/lib64 /etc/ld.so.conf.d
|
||||
os.execute("/sbin/ldconfig -X")
|
||||
rpm.execute("/sbin/ldconfig", "-X")
|
||||
|
||||
%filetriggerin -p <lua> -P 2000000 -- /lib /lib64 /usr/lib /etc/ld.so.conf.d
|
||||
-- Transaction-level runs of ldconfigs are not enough:
|
||||
-- e.g. lib64acl1 (/lib64/libacl.so.1) is installed after glibc, but is needed by
|
||||
-- scriptlets of packages that are installed in the same transaction before its end
|
||||
-- (between runs of ldconfig in glibc's %%post and glibc's transaction file trigger)
|
||||
-- TODO: remove /lib64 from non-transaction triggers when it becomes a symlink to /usr/lib64
|
||||
-- ld-linux finds libraries in standard paths (now /lib64 is not a standard path after /usr merge!)
|
||||
-- even if ldconfig was not run.
|
||||
rpm.execute("/sbin/ldconfig", "-X")
|
||||
|
||||
%filetriggerpostun -p <lua> -P 2000000 -- /lib /lib64 /usr/lib /etc/ld.so.conf.d
|
||||
rpm.execute("/sbin/ldconfig", "-X")
|
||||
%endif
|
||||
|
||||
%posttrans -p <lua>
|
||||
|
|
Loading…
Add table
Reference in a new issue