If a query is run specifying a non existent dbpath, rpm implictly creates a db
directory and db files at the specified location.
For example:
```
mkdir t
cd t
rpm -q rpm --dbpath $PWD/t
```
The above commands result in:
```
root@ph5dev:~ # mkdir t
mkdir: created directory 't'
root@ph5dev:~ # cd t
/root/t
root@ph5dev:~/t # rpm -q rpm --dbpath $PWD/t
package rpm is not installed
root@ph5dev:~/t # ls
t
root@ph5dev:~/t # ls t
rpmdb.sqlite rpmdb.sqlite-shm rpmdb.sqlite-wal
root@ph5dev:~/t # realpath t/*
/root/t/t/rpmdb.sqlite
/root/t/t/rpmdb.sqlite-shm
/root/t/t/rpmdb.sqlite-wal
```
And:
```
rpm -q rpm --dbpath /tmp
```
The above command creates sqlite.* files under /tmp
RPM Version:
```
root@ph5dev:~ # rpm --version
RPM version 4.18.0
```
Is this a feature or an intended behavior?
IMO, query commands should query the db and error out if the directory doesn't
exist or DB doesn't exist inside the specified directory with a proper error
message. Thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2572
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint