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
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.