Re: Regarding RPM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been out of the town until today so actually your timing has been
great.

I have a few comments on this I guess:

1: why not just require jdk 1.6 via RPM's built in mechanisms (Requires:),
which ties into the last part of #2.

2: It depends on how you are doing that, I'm sure you could probably just
set the JAVA_HOME yourself which would alleviate that side of it, but if
the check is looking for both at the same time, that might be your only way
out of it the way you are doing it.  But since you are doing an installer
script in your pre/post section you consider running the installer in the
%install section of the RPM?

-greg

> 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@xxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxx
> To :         rpm-list@xxxxxxxxxxxxx
> 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@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux