Regarding RPM

Amol P apuranik.2010 at gmail.com
Mon Jul 12 14:05:29 UTC 2010


thanks Greg for your reply & apologize for replying late.

As you said  "*exiting in the pre script is usually best, because exiting in
post still installs the package.You'll want to play with the exiting though,
I know a bad exit status will cancel/error out the install, but have never
tried to exit on purpose*", I tried that & I came out finely from the RPM
installation. But at the same time some internal RPM error appeared:

*Preparing...                ###########################################
[100%]*
*<RPM> Installation Started*
*Finding JAVA_HOME and Java Version ....... *
*Error: You have an older Java (1.5.0_22), Please Install JDK 1.6.0_14 or
Greater*
*Installer will quit .....*
*error: %pre(<RPM>) scriptlet failed, exit status 1*
*error:   install: %pre scriptlet failed (2), <RPM>*

where, <RPM> is my RPM.

My question is, can I silent the error message (underlined above), I mean I
don't want this to be appear if JAVA_HOME is not satisfied?

On 20 June 2010 18:56, <Greg_Swift at aotx.uscourts.gov> wrote:

>
> Depending on what you are trying to accomplish, then #1 is usually handled
> by Requires.  If you must do it programatically, exiting in the pre script
> is usually best, because exiting in post still installs the package.
> You'll want to play with the exiting though, I know a bad exit status will
> cancel/error out the install, but have never tried to exit on purpose.
>
> For #2, user input, and any amount of visible output, is generally
> considered bad practice.  For overridng the instakllation read up on
> Prefix, which can be overridden.  As I'm on my phone I don't have a link.
> The MaxRPM and the Fedora Packaging Guidelines are good reference usually.
>
> Greg Swift
> Sent with mobile device, please pardon errors.
>
>
>
> -------- Original Message --------
>
> >From :      rpm-list-bounces at lists.rpm.org
> To :         rpm-list at lists.rpm.org
> Cc :
> Sent on : 06/20/2010 08:17:05 AM
> Subject : Regarding RPM
>
> Hi All,
>
> I have few questions regarding RPM:
>
>
> 1.) Considering that certain condition doesn't get met, then can we exit
> from the pre/post installation shell script by providing the k/w 'exit' ?
>
> 2.) Can I take a User Input in pre/post installation section of RPM
> during installation of RPM.
> For example, during the installation of RPM, I would like to ask to user to
> provide a installation path for the application that is going to be
> installed etc.
> If No, then is there any other work around to do the same?
>
> Thanks.
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20100712/4a72b82e/attachment.html>


More information about the Rpm-list mailing list