Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 82443 - Attempt to erase non-existent package corrupts database
Summary: Attempt to erase non-existent package corrupts database
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-22 06:46 UTC by jw1233219
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-22 11:49:27 UTC


Attachments (Terms of Use)

Description jw1233219 2003-01-22 06:46:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; hahaha-fooled you!
This is really Mozilla/5.0 on Linux i686 rv:1.0.1 Gecko/2002103)

Description of problem:
If you attempt to erase a non-existent package rpm exits
with an error message but leaves database in inconsistent state.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. rpm -e kde-i18n-German
2. rpm -e kde-i18n-xxxxxx
3. rpm -e kde-i18n-Slovenian
    

Actual Results:  1. Success
2. error: package kde-i18n-xxxxxx is not installed
3. rpm hangs up forever - you can only stop the process
   with kill -9 because it has interrupts disabled.



Expected Results:  1. Success
2. error: package kde-i18n-xxxxxx is not installed
3. Success


Additional info:

rpm should be much more robust because it is so important to
the maintenance of a system, and because it is a RedHat product.

An instance of rpm should also behave differently if it sees
that the database appears to be locked - instead of just hanging
indefinitely with all signals disabled!

Comment 1 Jeff Johnson 2003-01-22 10:26:00 UTC
You have a stale lock.

This has nothing to do with removal of non-existent
packages.

Remove the stale lock by doing
    rm -f /var/lib/rpm/__db*

See the bug report regarding "hangs" and "READ ME FIRST".

Comment 2 jw1233219 2003-01-22 11:45:01 UTC
Before I started I did:

    rm -f /var/lib/rpm/__*
    rpm --initdb
    rpm --rebuilddb

So it was a clean database.



Comment 3 Jeff Johnson 2003-01-22 11:49:27 UTC
I tried exactly the commands you gave with rpm-4.2-0.56
and cannot reproduce.



Note You need to log in before you can comment on or make changes to this bug.