From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 6 Nov 2008 19:13:31 +0300 From: "Alexey M. Tourbin" To: devel@lists.altlinux.org Message-ID: <20081106161331.GU9550@altlinux.org> Mail-Followup-To: devel@lists.altlinux.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="udzYTtuEmHLUHegf" Content-Disposition: inline Subject: [devel] 0ldconfig.filetrigger (packages/rpm: heads/altlinux-4.1) X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Nov 2008 16:13:35 -0000 Archived-At: List-Archive: List-Post: --udzYTtuEmHLUHegf Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =F0=CF=DA=D7=CF=CC=D1=C5=D4 =CC=C9 =DC=D4=CF =D5=C4=C1=CC=C9=D4=D8 =D2=C1= =DA=CE=CF=CF=C2=D2=C1=DA=CE=D9=C5 =D7=D9=DA=CF=D7=D9 ldconfig =C9=DA *=D7=D3=C5=C8* =D0=C1=CB=C5=D4=CF=D7? 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 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. =20 +# library flag +lib=3D + +# system library flag +sys=3D + 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=3DC [ "$f" '>' "/lic" ]; then + #echo >&2 break=3D"$f" + break + fi # 1) Check if basename looks like a shared library. case "${f##*/}" in - lib*.so*) ;; - *) continue ;; + lib*.so*) + #echo >&2 lib=3D"$f" + lib=3D1 + ;; + *) 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=3D"$f" + sys=3D1 + break + ;; + esac done + +if [ -n "$lib" ]; then + /sbin/ldconfig +fi + +update_chrooted=3D/sbin/update_chrooted +if [ -n "$sys" ] && [ -x "$update_chrooted" ]; then + "$update_chrooted" lib +fi --udzYTtuEmHLUHegf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkkTF6sACgkQfBKgtDjnu0afogCeNnpxRRReC014hGH7mms39bsH LRMAoK75TRyx2kur3VwkE0xr8YiM7leu =Yk7o -----END PGP SIGNATURE----- --udzYTtuEmHLUHegf--