LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-03-2009, 02:45 PM   #1
dsollen
Member
 
Registered: Jun 2009
Posts: 56

Rep: Reputation: 15
Allowing user to choose if RPM should install when errors are detected


Well this isn't very important, but it is something I would like to do if possible.

I'm tweaking my RPM a bit including some extra error checking above and beyond what RPM does itself. This includes having my %pre script looking for signs that java is probably not configured correctly for our application.

Now originally I was just going to exit with an error message when I thought java was mis-configured, but I’m not cretin that’s the best option. I can only say that things are probably not properly configured, but I can’t be certain they aren’t. I don't want the RPM to refuse to install because it mistakenly thinks something is broken when it isn’t. Ideally I would print an error message and give the user the option to choice rather to continue the installation; either by being prompted for a yes/no or by running the RPM installation with an argument that forces the install.

I tried prompting for input and using the read command; but I never have an opportunity to input anything when I install the RPM. The read command complains about "too many arguments" and the RPM continues installing without waiting for input.

So is there a method to have an RPM warn about the error but still provide the user a means to force the install if they choice?
 
Old 12-03-2009, 03:13 PM   #2
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Rep: Reputation: 23
Why not let rpm exit with your error message, and then simply rerun
'rpm -i --force <pkgname.rpm>
 
Old 12-03-2009, 04:29 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by dsollen View Post
Well this isn't very important
It is, but not in the sense you think it is...


Quote:
Originally Posted by dsollen View Post
I don't want the RPM to refuse to install because it mistakenly thinks something is broken when it isn’t.
Yes. You want that. You just didn't know you wanted that.


Quote:
Originally Posted by dsollen View Post
Ideally I would print an error message and give the user the option to choice rather to continue the installation; either by being prompted for a yes/no or by running the RPM installation with an argument that forces the install.
Remember a good portion of RPM installations or upgrades will be automated. So no user interaction should be required. Forcing user interaction, meaning forcing a non-standard way of handling RPM, is unnecessary, unwanted and not like RPM is designed and intended to be used. In short: be aware of breaking things for reasons other than what RPM requires. And if a problem exists due to an installation problem with other package X then fixing that problem should be addressed in package X.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Office Org 3.0.1 RPM Install Errors fts9 Linux - Software 1 03-06-2009 06:27 PM
Is there is any wat to non root user can able to install rpm baskar.v Linux - Newbie 9 11-18-2008 03:23 AM
Open Office user install error: *** glibc detected *** double free or corruption: 0xb r_jensen11 Linux - General 6 01-16-2005 06:08 AM
can i install rpm package as non-root user? parv Linux - Software 10 09-17-2004 10:46 PM
getting errors when trying to install rpm tarak4u Linux - Networking 2 06-06-2002 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration