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 78766

Summary: rpm -e on read-only partition removes package from database (but not from filesystem)
Product: [Retired] Red Hat Linux Reporter: Need Real Name <epostma>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-29 13:48:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Need Real Name 2002-11-29 13:48:38 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

Description of problem:
When I try to remove a package that has some (or all) files on a partition that
is mounted read-only, rpm doesn't complain but simply ignores these files. The
package is then removed from the database. The only way to fully remove the
package (except from deleting files by hand) is to (obviously) remount the
partition read-write, reinstall the package (to get it into the database) and
remove it again.

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


How reproducible:
Always

Steps to Reproduce:
1. Install a package that has some files on a partition you can mount read-only.
Say we use ltp-11.07.02-0.i386.rpm (the linux test project). It installs in
/usr/local/ltp/... and /usr/share/..., so these would have to be on a partition
that can be mounted read-only. Let's assume /usr is a separate partition.
2. mount /usr -o ro,remount
3. rpm -e ltp
4. ls /usr/local
5. rpm -q ltp

Actual Results:  
After step 3.: after a second of two, the prompt returns. No output.
After step 4.: all the files are there still (of course)
After step 5.: it says "package ltp is not installed"

Expected Results:  
After step 3.: it should have said "Hey, I can't remove these files!"
After step 4.: (should still show all files)
After step 5.: it should have said "ltp-11.07.02-0"

Additional Information:
This bug seems to be related to bug #74438.

Comment 1 Jeff Johnson 2002-11-29 14:45:07 UTC
Other than through %_netsharedpath, rpm has no
support for RO mounts, ditto chattr files.

No matter what, rpm cannot remove readonly files.

Comment 2 Need Real Name 2002-11-29 16:37:43 UTC
Maybe I wasn't quite clear -- I agree that rpm can't and shouldn't remove the
files, but it should complain that something is wrong (as suggested in expected
results, step 3). And I think it should let the package remain in the rpm
database, because that makes it difficult to remove the files after remounting
the partition read-write (as suggested in expected results, step 5).