[devel] 0ldconfig.filetrigger (packages/rpm: heads/altlinux-4.1)
Alexey M. Tourbin
=?iso-8859-1?q?at_=CE=C1_altlinux=2Eorg?=
Чт Ноя 6 19:13:31 MSK 2008
Позволяет ли это удалить разнообразные вызовы ldconfig
из *всех* пакетов?
Update of /people/at/packages/rpm.git
Changes statistics since `4.0.4-alt95.M41.5-4-g70f8851' follows:
scripts/0ldconfig.filetrigger | 40 +++++++++++++++++++++++++++++++++++++---
1 files changed, 37 insertions(+), 3 deletions(-)
Changelog since `4.0.4-alt95.M41.5-4-g70f8851' follows:
commit f46b034eba0103c7652378643baaccfe5d841036
Author: Alexey Tourbin <at на altlinux>
Date: Thu Nov 6 16:26:54 2008 +0300
0ldconfig.filetrigger: execute "/sbin/update_chrooted lib" for /lib and /lib64
Full diff since `4.0.4-alt95.M41.5-4-g70f8851' follows:
diff --git a/scripts/0ldconfig.filetrigger b/scripts/0ldconfig.filetrigger
index b17f85a..6ec01c0 100755
--- a/scripts/0ldconfig.filetrigger
+++ b/scripts/0ldconfig.filetrigger
@@ -7,11 +7,29 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
+# library flag
+lib=
+
+# system library flag
+sys=
+
while read -r f; do
+ # 0) Short circuit condition: if a library is already found,
+ # skip the remaining list of non-system libraries. Note that
+ # the input file list is sorted, and "/lic" collates after
+ # "/lib" and "/lib64".
+ if [ -n "$lib" ] && LC_ALL=C [ "$f" '>' "/lic" ]; then
+ #echo >&2 break="$f"
+ break
+ fi
# 1) Check if basename looks like a shared library.
case "${f##*/}" in
- lib*.so*) ;;
- *) continue ;;
+ lib*.so*)
+ #echo >&2 lib="$f"
+ lib=1
+ ;;
+ *) continue
+ ;;
esac
# 2) It is also possible to check dirname and skip private
# directories (public ones are /lib, /lib64, /usr/lib, and
@@ -25,5 +43,21 @@ while read -r f; do
# exist, then $f appears to be a compile-time symbolic link.
# However, /etc/ld.so.cache seems to include both sonames and
# non-soname lib*.so entries.
- exec /sbin/ldconfig
+ # 4) Check whether it is a system library.
+ case "${f%/*}" in
+ /lib | /lib/* | /lib64 | /lib64/* )
+ #echo >&2 sys="$f"
+ sys=1
+ break
+ ;;
+ esac
done
+
+if [ -n "$lib" ]; then
+ /sbin/ldconfig
+fi
+
+update_chrooted=/sbin/update_chrooted
+if [ -n "$sys" ] && [ -x "$update_chrooted" ]; then
+ "$update_chrooted" lib
+fi
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип : application/pgp-signature
Размер : 197 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url : <http://lists.altlinux.org/pipermail/devel/attachments/20081106/e546c369/attachment.bin>
Подробная информация о списке рассылки Devel