ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Grigory Batalov <bga@altlinux.ru>
To: devel@altlinux.ru
Subject: [devel] alternatives priority
Date: Sat, 16 Jul 2005 02:12:39 +0400
Message-ID: <20050716021239.4a8290c7.bga@altlinux.ru> (raw)

Здравствуйте!

Решил распилить dosemu на две альтернативы: с зависимостью на
X11 и без. При попытке установки apt-get вытягивает dosemu-bin-x,
что правильно:

$ sudo apt-get install dosemu
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие дополнительные пакеты будут установлены:
  dosemu-bin-x
Следующие НОВЫЕ пакеты будут установлены:
  dosemu dosemu-bin-x

Однако, если я не хочу поддержки X11, я поставлю dosemu-bin-nox:

$ sudo apt-get install dosemu dosemu-bin-nox
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие дополнительные пакеты будут установлены:
  dosemu-bin-x
Следующие НОВЫЕ пакеты будут установлены:
  dosemu dosemu-bin-nox dosemu-bin-x

Вот это и странно, почему всё равно вытягивается dosemu-bin-x?
Ведь и bin-x и bin-nox оба предоставляют %_bindir/dosemu.bin.
Более того, порядок указания пакетов имеет значение:

$ sudo apt-get install dosemu-bin-nox dosemu
Чтение списков пакетов... Завершено
Построение дерева зависимостей... Завершено
Следующие НОВЫЕ пакеты будут установлены:
  dosemu dosemu-bin-nox

Так вот я хочу узнать, это баго-фича apt или я чего-то не учёл
в spec-файле? Прилагаю его кусок:


...
Name: dosemu
Obsoletes: xdosemu
Provides: xdosemu = %version-%release
Requires: xvt, %_bindir/dosemu.bin
...
%package bin-x
PreReq: alternatives
Provides: %_bindir/dosemu.bin
...
%package bin-nox
PreReq: alternatives
Provides: %_bindir/dosemu.bin
...
%post bin-x
%register_alternatives dosemu-bin-x.xml

%preun bin-x
%unregister_alternatives dosemu-bin-x.xml

%post bin-nox
%register_alternatives dosemu-bin-nox.xml

%preun bin-nox
%unregister_alternatives dosemu-bin-nox.xml
...
%files bin-x
%_altdir/dosemu-bin-x.xml
%_bindir/dosemu.bin.x

%files bin-nox
%_altdir/dosemu-bin-nox.xml
%_bindir/dosemu.bin.nox


                 reply	other threads:[~2005-07-15 22:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050716021239.4a8290c7.bga@altlinux.ru \
    --to=bga@altlinux.ru \
    --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