ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Alexey M. Tourbin" <at@altlinux.org>
To: devel@lists.altlinux.org
Subject: [devel] 0ldconfig.filetrigger (packages/rpm: heads/altlinux-4.1)
Date: Thu, 6 Nov 2008 19:13:31 +0300
Message-ID: <20081106161331.GU9550@altlinux.org> (raw)

[-- 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 --]

             reply	other threads:[~2008-11-06 16:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 16:13 Alexey M. Tourbin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081106161331.GU9550@altlinux.org \
    --to=at@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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