Bug 141556 - rdonly query creates files when using --root or --dbpath
Summary: rdonly query creates files when using --root or --dbpath
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-02 00:00 UTC by Mike McLean
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-07 23:00:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Mike McLean 2004-12-02 00:00:16 UTC
Description of problem:
An rpm query using the --root or --dbpath options will (silently) create
directories and files for an rpm db if they do not yet exist.  This is
counter-intuitive because one expects a query operation to be read-only.

Version-Release number of selected component (if applicable):
rpm-4.2.2-0.14.i386

How reproducible:
always

Steps to Reproduce:
[root@zim root]# rm -rf /tmp/badpath
[root@zim root]# rpm -qa --root /tmp/badpath

Actual results:
[root@zim root]# find /tmp/badpath -type f
/tmp/badpath/var/lib/rpm/__db.001
/tmp/badpath/var/lib/rpm/__db.002
/tmp/badpath/var/lib/rpm/__db.003
/tmp/badpath/var/lib/rpm/Packages

Expected results:
[root@zim root]# find /tmp/badpath -type f
find: /tmp/badpath: No such file or directory

and perhaps even
[root@zim root]# rpm -qa --root /tmp/badpath
rpmq: no such rpm database, try using rpm --initdb first

Comment 1 Jeff Johnson 2005-02-07 23:00:08 UTC
Unless told otherwise (and with an attached tracking
bug so I know where to delive a fix), this is exactly
the behavior that I intended to implement in rpm.


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