ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Led <ledest@gmail.com>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] %pre in update package
Date: Sun, 23 Nov 2008 01:47:35 +0200
Message-ID: <200811230147.35375.ledest@gmail.com> (raw)
In-Reply-To: <20081122233813.GB12206@wo.int.altlinux.org>

On Sunday, 23 November 2008 01:38:13 Dmitry V. Levin wrote:
> 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).

Проверил ровно 3 (ТРИ) раза. После того, как сделал
s|find|/bin/&|
всё заработало и в случае "apt-get install" 

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

И то, и другое - штатная ситуация. find (в данном случае) должен что-то делать 
ТОЛЬКО если:
1) каталог, в котором ему указали искать, существует
2) в каталоге есть симлинки - тогда их нужно удалить, иначе rpm "захлебнётся" 
(я уже не пытаюсь говорить, что это похоже на багу rpm, потому как она 
существует достаточно длительное время, чтобы считать её тупой фичей:)

-- 
Led

  reply	other threads:[~2008-11-22 23:47 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
2008-11-22 23:47                 ` Led [this message]
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=200811230147.35375.ledest@gmail.com \
    --to=ledest@gmail.com \
    --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