ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Mikhail Zabaluev <mhz@altlinux.org>
To: devel@altlinux.ru
Subject: [devel] Re: post and postun sections
Date: Fri, 29 Nov 2002 01:36:20 +0300
Message-ID: <20021128223620.GF1692@mhz.mikhail.zabaluev.name> (raw)
In-Reply-To: <20021128130028.GB28238@sam-solutions.net>

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

Hello Alexander,

On Thu, Nov 28, 2002 at 03:00:28PM +0200, Alexander Bokovoy wrote:
>
> On Thu, Nov 28, 2002 at 03:55:54PM +0300, Vitaly Ostanin wrote:
> > Hello, All!
> > 
> > При обновлении (rpm -Uvh) установленного пакета с секциями %post
> > и %postun в spec'е сначала выполняется %post, затем %postun.
> > 
> > Подскажите, pls, как регулировать последовательность выполнения
> > скриптов? В моём случае (alt-entities) нужно при установке пакета
> > добавлять запись в /etc/xml/catalog, а при удалении - удалять
> > запись. Это работает, но при обновлении пакета сначала
> > добавляется запись, а потом удаляется.
> > 
> > Туда же - как можно указать скрипт, который не должен выполняться
> > при обновлении вообще - только при установке или удалении?
> %post
> if [ $1 = "0" ] ; then
> 	действия
> fi
> 
> %postun
> if [ $1 = "1" ] ; then
> 	действия
> fi

Обычно наоборот.
И в %post не нужно проверять, если установочные действия
могут быть повторены многократно без ущерба
для функциональности.

-- 
Stay tuned,
  MhZ                                     JID: mookid@jabber.org
___________
Hey, what do you expect from a culture that *drives* on *parkways* and
*parks* on *driveways*?
		-- Gallagher

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

  reply	other threads:[~2002-11-28 22:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-28 12:55 [devel] " Vitaly Ostanin
2002-11-28 13:00 ` Alexander Bokovoy
2002-11-28 22:36   ` Mikhail Zabaluev [this message]
2002-11-29  9:06     ` [devel] " Alexander Bokovoy
2002-11-29 11:04     ` Vitaly Ostanin
2002-11-28 13:03 ` [devel] " 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=20021128223620.GF1692@mhz.mikhail.zabaluev.name \
    --to=mhz@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