ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] /etc/ld.so.cache
Date: Fri, 19 Sep 2008 07:02:56 +0000
Message-ID: <20080919070256.GH32012@altlinux.org> (raw)
In-Reply-To: <20080915100527.GC11884@wo.int.altlinux.org>

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

On Mon, Sep 15, 2008 at 02:05:27PM +0400, Dmitry V. Levin wrote:
> > /usr/lib/rpm/0ldconfig.filetrigger
> >      1	#!/bin/sh
> >      2	
> >      3	IFS=
> >      4	while read -r f; do
> >      5		case "$f" in
> >      6			/lib/lib*/*.so* |\
> >      7			/lib64/lib*/*.so* |\
> >      8			/usr/lib/lib*/*.so* |\
> >      9			/usr/lib64/lib*/*.so* )
> >     10				# false positives
> >     11				continue ;;
> >     12			/lib/lib*.so |\
> >     13			/lib64/lib*.so |\
> >     14			/usr/lib/lib*.so |\
> >     15			/usr/lib64/lib*.so )
> >     16				# maybe soname
> >     17				if set $f.* && [ -f "$1" ]; then
> >     18					continue
> >     19				fi
> >     20				;;
> >     21			/lib/lib*.so.* |\
> >     22			/lib64/lib*.so.* |\
> >     23			/usr/lib/lib*.so.* |\
> >     24			/usr/lib64/lib*.so.* )
> >     25				# soname
> 
> Могут возникнуть (раньше были) дополнительные каталоги,
> возможно стоит запустить /usr/lib/rpm/dump_ld_config.

dump_ld_config не документирован, а из исходников не совсем очевидно,
какой у него synopsis и что он должен выводить.

В любом случае, идея понятна: лучше исходить не из фиксированного набора
каталогов, которые перечисляются в шаблонах, а из списка каталогов в
общем виде.

while read -r f; do
	case "$f" in
		/etc/ld.so.conf.d/*.conf)
			exec /sbin/ldconfig
			;;
	esac
	case "${f##*/} in
		lib*.so*) ;;
		*) continue ;;
	esac
	found=
	for dir in $dirs; do
		case "$f" in
			# XXX /usr/lib64/sse2
			"$dir"/*/*) continue ;;
			"$dir"/*) found=1; break ;;
			*) continue ;;
		esac
	done
	[ -n "$found" ] || continue
	case "${f##*/} in
		lib*.so)
			if set "$f".* && [ -f "$1" ]; then
				continue
			fi
			;;
	esac
	exec /sbin/ldconfig
done

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

  reply	other threads:[~2008-09-19  7:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08  9:51 [devel] posttrans filetriggers [2] Alexey Tourbin
2008-09-08 12:07 ` Igor Vlasenko
2008-09-08 13:49 ` [devel] libgtk+2 Dmitry V. Levin
2008-09-08 13:55   ` Alexey Rusakov
2008-09-08 14:18   ` Yuri N. Sedunov
2008-09-08 14:23     ` Dmitry V. Levin
2008-09-08 14:42       ` Yuri N. Sedunov
2008-09-08 14:46         ` Dmitry V. Levin
2008-09-08 15:15           ` Yuri N. Sedunov
2008-09-08 15:21             ` Mikhail Gusarov
2008-09-08 15:24             ` Andrey Rahmatullin
2008-09-08 15:26             ` Alexey Rusakov
2008-09-08 15:41               ` Yuri N. Sedunov
2008-09-08 15:46                 ` Dmitry V. Levin
2008-09-08 15:54                   ` Yuri N. Sedunov
2008-09-09 10:05                     ` Sergey V Turchin
2008-09-08 15:27             ` Dmitry V. Levin
2008-09-11 19:25   ` [devel] /etc/ld.so.cache Alexey Tourbin
2008-09-11 19:58     ` Dmitry V. Levin
2008-09-11 20:16       ` Alexey Tourbin
2008-09-11 20:20         ` Dmitry V. Levin
2008-09-11 20:38           ` Alexey Tourbin
2008-09-11 20:48             ` Alexey Tourbin
2008-09-11 20:53               ` Dmitry V. Levin
2008-09-15  7:11                 ` Alexey Tourbin
2008-09-15 10:05                   ` Dmitry V. Levin
2008-09-19  7:02                     ` Alexey Tourbin [this message]
2008-10-06  7:04                   ` Alexey Tourbin
2008-09-11 20:50             ` 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=20080919070256.GH32012@altlinux.org \
    --to=at@altlinux.ru \
    --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