ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Stanislav Ievlev <inger@altlinux.org>
To: ALT Devel discussion list <devel@altlinux.ru>
Subject: Re: [devel] How to use alternatives ?
Date: Mon, 27 Dec 2004 11:35:13 +0300
Message-ID: <20041227083513.GD31552@basalt.office.altlinux.org> (raw)
In-Reply-To: <E1Ciirm-000EhK-00.ilya_evseev-mail-ru@f32.mail.ru>

On Mon, Dec 27, 2004 at 03:36:06AM +0300, Илья Евсеев  wrote:
>    Всем привет.
> Имеется следующая проблема с использованием alternatives-0.2.0-alt0.6:
> при удалении пакета с высоким приоритетом симлинк исчезает вообще,
> вместо того чтобы переназначиться на вариант с низким приоритетом.
> 
> Спек первого пакета (%name = dosbox):
> -------------------------------------------------------
> %install
> ...
> # Alternatives support
> %__mkdir_p %buildroot%_altdir
> %__cat << __EOF__ > %buildroot%_altdir/%name
> <group name="candidate">
>     <option name="link">%_bindir/%name</option>
>     <option name="real">%_bindir/%name-wrapper</option>
>     <option name="weight" type="number">10</option>
> </group>
> __EOF__
> 
> %post
> %post_register_alternatives %name -- %name
> 
> %preun
> %preun_unregister_alternatives %name
> -------------------------------------------------------
> При его инсталляции правильно создается симлинк
> /usr/bin/dosbox, указывающий на /usr/bin/dosbox-wrapper.
> 
> Спек второго пакета (%name = dosbox-russian, %name0 = dosbox):
> -------------------------------------------------------
> %install
> ...
> # Alternatives support
> %__mkdir_p %buildroot%_altdir
> %__cat << __EOF__ > %buildroot%_altdir/%name
> <group name="candidate">
>     <option name="link">%_bindir/%name0</option>
>     <option name="real">%_bindir/%name</option>
>     <option name="weight" type="number">40</option>
> </group>
> __EOF__
> 
> %post
> %post_register_alternatives %name
                              ^^^^^
> %preun
> %preun_unregister_alternatives %name
                                 ^^^^^
s/%name/%name0

P.S. Новый формат конфигов лучше.
> -------------------------------------------------------
> При его инсталляции правильно симлинк /usr/bin/dosbox
> начинает указывать на /usr/bin/dosbox-russian.
> Однако при удалении этого пакета симлинк не перенацеливается
> обратно на /usr/bin/dosbox-wrapper, а исчезает совсем.
> 
> Что я сделал не так?
> 
> С уважением,
> Илья Евсеев
> _______________________________________________
> Devel mailing list
> Devel@altlinux.ru
> https://lists.altlinux.ru/mailman/listinfo/devel


  reply	other threads:[~2004-12-27  8:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27  0:36 Илья Евсеев 
2004-12-27  8:35 ` Stanislav Ievlev [this message]
2004-12-27  8:36   ` Stanislav Ievlev
2004-12-28  8:13     ` Stanislav Ievlev

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=20041227083513.GD31552@basalt.office.altlinux.org \
    --to=inger@altlinux.org \
    --cc=devel@altlinux.ru \
    /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