On Mon, Apr 18, 2022 at 02:56:37PM +0200, la...@debian.org wrote:
> 
> > On one side, “rpm -qa” will create the directory in my home directory as
> > myself, but “sudo rpm -qa” will do the wrong thing.
> 
> What do you mean by wrong?
> 
> On my bullseye machine sudo rpm -qa creates the subdirectory in
> /root/.rpmdb as root. So IMO this works correct.
> 
> rpm -qa without sudo creates $HOME/rpmdb as my user. This is also
> correct.
> 
> I don't understand why this bug was assigned to rpm.

If you run sudo without the "set_home" option, thus making it preserve
the HOME environment variable, rpm run as root with HOME set to
/home/something will indeed do the wrong thing.

I will take a look into making the controversial Debian local patch to
rpm for creating a per-user database perform some more checks.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13

Attachment: signature.asc
Description: PGP signature

Reply via email to