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

Summary: Attempt to erase non-existent package corrupts database
Product: [Retired] Red Hat Linux Reporter: jw1233219
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WORKSFORME QA Contact: Mike McLean <mikem>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-22 11:49:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.