[Rpm-maint] %pre section is executed asynchronously - meant behavior?

Panu Matilainen pmatilai at redhat.com
Fri Feb 1 13:51:41 UTC 2008

On Fri, 1 Feb 2008, Alex Lobanovsky wrote:

> ALL,
> hope this is THE place to ask rpm development questions. If not, please,
> excuse me and direct me to the right place.
> In course of rpm installation I need to display license before any
> installation takes place, and wait for user to accept the license. If it is
> accepted, rpm goes on. If not, nothing must happen.
> In debian distro's I use preinst script for this. It works fine. For rpm I
> use %pre section in .spec file. Surprisingly, rpm executes %pre part of
> script asynchronously! It doesn't wait for exit code of the script, it
> doesn't idle setup process. Is this meant behavior?
> How can I force rpm to execute %pre script synchronously and respect the
> exit code of this script?

The short answer is "you don't" - rpm is designed for non-interactive 
operation (and yes it's sharp contrast to dpkg).

Instead of banging your head against rpm design, move the license question 
to first software startup time. That's where it makes much more sense on 
multiuser systems anyway.

 	- Panu -

More information about the Rpm-maint mailing list