Bug 78766 - rpm -e on read-only partition removes package from database (but not from filesystem)
rpm -e on read-only partition removes package from database (but not from fil...
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-11-29 08:48 EST by Need Real Name
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-29 08:48:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2002-11-29 08:48:38 EST
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:

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 09:45:07 EST
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 11:37:43 EST
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).

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