ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] %pre in update package
Date: Sun, 23 Nov 2008 02:38:13 +0300
Message-ID: <20081122233813.GB12206@wo.int.altlinux.org> (raw)
In-Reply-To: <200811230134.18238.ledest@gmail.com>

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

On Sun, Nov 23, 2008 at 01:34:18AM +0200, Led wrote:
> On Sunday, 23 November 2008 01:23:40 Dmitry V. Levin wrote:
> > On Sun, Nov 23, 2008 at 01:19:19AM +0200, Led wrote:
> > > On Sunday, 23 November 2008 01:08:37 Dmitry V. Levin wrote:
> > > > On Sun, Nov 23, 2008 at 01:01:10AM +0200, Led wrote:
[...]
> > > > > http://git.altlinux.org/people/led/packages/erlang-doc.git
> > > >
> > > > Вы предлагаете это собрать и установить apt'ом?
> > >
> > > Нет, не предлагаю. Я показал пример, в котором это произошло.
> >
> > Это пример глючного %pre-скрипта.
> >
> > > > А какой смысл в написанном там действии
> > > > %pre
> > > > /bin/find %_docdir/%bname-%version/lib -type l -delete
> > >
> > > Я не знаю как иначе rpm заставить удалить симлинки, если в новом релизе
> > > пакета эти симлинки на каталоги поменялись на реальные каталоги.
> >
> > Сперва проверьте, что каталог %_docdir/%bname-%version/lib существует.
> 
> Проверял. При существующем каталоге и симлинках в нём "rpm -U" 
> отрабатывает %pre-скрипт, а "apt--get install" - нет и пытается обновить 
> пакет (естественно, обламывается).

"Не верю" (c).

> > cd %_docdir/%bname-%version/lib 2>/dev/null &&
> > find -type l -delete ||:
> 
> Зачем? find сам проверяет наличие каталога, в которые его натравливают, 
> если %_docdir/%bname-%version/lib не существует, find ничего не делает.
> "2>/dev/null ||:" действительно стОит указать, спасибо.

Чтобы отличить штатную ситуацию (отсутствие каталога) от нештатной
ситуации (find не смог искать и/или удалить запрошенное).


-- 
ldv

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

  reply	other threads:[~2008-11-22 23:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 22:49 Led
2008-11-21 23:24 ` Led
2008-11-22 22:53   ` Dmitry V. Levin
2008-11-22 23:01     ` Led
2008-11-22 23:08       ` Dmitry V. Levin
2008-11-22 23:19         ` Led
2008-11-22 23:23           ` Dmitry V. Levin
2008-11-22 23:34             ` Led
2008-11-22 23:38               ` Dmitry V. Levin [this message]
2008-11-22 23:47                 ` Led
2008-11-22 23:57                   ` Dmitry V. Levin
2008-11-23  0:04                     ` Led
2008-11-23  0:06                       ` Dmitry V. Levin
2008-11-23  0:28                     ` Led

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=20081122233813.GB12206@wo.int.altlinux.org \
    --to=ldv@altlinux.org \
    --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