LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 06-06-2013, 04:51 PM   #1
gusthecat
LQ Newbie
 
Registered: Feb 2012
Posts: 19

Rep: Reputation: Disabled
rpm fails but still shows installed


How do you handle this condition in a spec file:

if some actions fails and the error status is properly caught the rpm should not be listed in rpm db as installed


If I exit 1 on failure the rpm is still listed.
 
Old 06-06-2013, 05:13 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,523

Rep: Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805
Are you trying to use "rpm" to install the rpm ,or the best way using your package manager
" yum" or " zypper "
 
Old 06-07-2013, 09:03 AM   #3
gusthecat
LQ Newbie
 
Registered: Feb 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
the package is installed via rpm.
 
Old 06-07-2013, 02:08 PM   #4
John VV
Guru
 
Registered: Aug 2005
Posts: 13,523

Rep: Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805
When you use " yum " are there any errors
 
Old 06-08-2013, 03:42 PM   #5
mariose
Member
 
Registered: May 2013
Location: Republic of South Africa
Distribution: Slackware 14.1
Posts: 169

Rep: Reputation: 6
Quote:
Originally Posted by John VV View Post
Are you trying to use "rpm" to install the rpm ,or the best way using your package manager
" yum" or " zypper "
Yes, "gusthecat" are you able to provide your displays output?
 
Old 06-10-2013, 10:13 AM   #6
gusthecat
LQ Newbie
 
Registered: Feb 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
Folks thanks for replying but based on your questions to me I'm not sure I asked my question correctly.
Let me try again

I'm writing a spec file to install some files and update a database.
If during that process something fails, for example writing to the database fails I can catch that
error and but how do I exit the installer and not have the rpm database updated showing the failed package
is installed?
 
Old 06-10-2013, 01:59 PM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 13,523

Rep: Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805Reputation: 1805
The package manager ( yum or zypper) will handle that

if a dependency can not be met,or an error during the install , then it will not install

Last edited by John VV; 06-10-2013 at 02:01 PM.
 
Old 06-10-2013, 02:45 PM   #8
mariose
Member
 
Registered: May 2013
Location: Republic of South Africa
Distribution: Slackware 14.1
Posts: 169

Rep: Reputation: 6
Whatever dependencies are missing would need to be manually installed either using RPM, YUM etc...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Complexity using PAM FAILS and shows no effect Rahil Parikh Linux - Server 2 11-24-2010 08:30 AM
Software shows up as installed and not installed at same time in zypper. LazerPhreak Linux - Software 2 12-13-2009 02:01 AM
installed apache from source, didn't remove rpm, updated rpm causes problems leftPeg Linux - Newbie 5 06-06-2007 10:20 PM
Doom3 demo shows screen then fails ctlphd Linux - Games 8 04-07-2005 05:15 PM
rpm -q not shows installed rpm mla Linux - Software 4 10-31-2004 03:49 PM


All times are GMT -5. The time now is 12:29 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration