ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] 0ldconfig.filetrigger (packages/rpm: heads/altlinux-4.1)
@ 2008-11-06 16:13 Alexey M. Tourbin
  2008-11-08 14:29 ` Dmitry V. Levin
  2008-11-08 14:32 ` Dmitry V. Levin
  0 siblings, 2 replies; 8+ messages in thread
From: Alexey M. Tourbin @ 2008-11-06 16:13 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2265 bytes --]

Позволяет ли это удалить разнообразные вызовы 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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-11-08 15:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-06 16:13 [devel] 0ldconfig.filetrigger (packages/rpm: heads/altlinux-4.1) Alexey M. Tourbin
2008-11-08 14:29 ` Dmitry V. Levin
2008-11-08 14:52   ` Alexey Tourbin
2008-11-08 15:28     ` Dmitry V. Levin
2008-11-08 14:32 ` Dmitry V. Levin
2008-11-08 15:10   ` Alexey Tourbin
2008-11-08 15:26     ` Alexey Tourbin
2008-11-08 15:30       ` Dmitry V. Levin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git