LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-20-2012, 08:47 AM   #1
gusthecat
LQ Newbie
 
Registered: Feb 2012
Posts: 19

Rep: Reputation: Disabled
rpm fails but package is listed in database


I'm creating an rpm and if it fails it removes whatever it has already installed, except for a log and exits with status 1. I wouldn't expect that package to be listed in the database but it is.

How do I prevent the package being recorded in the database if it fails?

thanks
 
Old 06-20-2012, 10:11 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I haven't seen any articles on how to prevent updating the rpm database if installation fails. However, there are a couple of ways to correct the problem after the fact, by deleting and rebuilding the database.

If using yum to install, as root, in a terminal:
Quote:
rm /var/lib/rpm/__db*
yum --rebuilddb
yum -y update
If installing manually via rpm:
Quote:
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
 
Old 06-20-2012, 10:38 AM   #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 gusthecat View Post
I'm creating an rpm and if it fails it removes whatever it has already installed, except for a log and exits with status 1.
I think I'd rather see your .spec file first...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple installs of same package in RPM database kamdh Fedora 10 10-15-2015 08:18 AM
multipath routing, first listed 'nexthop' always fails exodist Linux - Networking 1 03-10-2006 03:34 PM
Remove package from RPM database? breddy Linux - Newbie 1 07-21-2004 11:51 PM
RPM not listed as installed, but it is...?? AdvDigitalImg Linux - General 2 11-23-2003 03:17 PM
can reinstall the rpm package without delete the rpm package eye Red Hat 1 10-20-2003 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:21 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