Michael Matz schrieb:
On Mon, 9 Dec 2019, Ludwig Nussel wrote:
/usr/lib/sysimage/rpm/.rpm.lock /usr/lib/sysimage/rpm/Basenames /usr/lib/sysimage/rpm/Conflictname /usr/lib/sysimage/rpm/Dirnames /usr/lib/sysimage/rpm/Enhancename ...
That is quite expected. I would not expect to lose the actual databases. `rpm -e rpm` should not remove (what was once) /var/lib/rpm, `rpm -e mariadb` should not remove /var/lib/mysql, and `rpm -e postfix` should not delete my mails.
I can see the case for removing rpm *and* the database in order to e.g. strip down container images. Which situation do you envision where you would want to remove the package but keep the db?
When you are installing an alternative by way of splitting deletion and new install into two separate transactions (sometimes that is possible, sometimes there is a Require on e.g. smtp_daemon or whatever that inhibits it in the first step, but still.).
Referring to any package except rpm I guess. I meant rpm specifically. There is no alternative implementation that would use the rpmdb AFAIK :-)
But there could be (and there are consumers of the rpmdb, e.g. the libsolv-tools). So from fundamental principles I'd agree with Jan, removal of foo should not remove foo's user-data, and there's no reason why rpm should be special cased.
If it really was user data I'd probably agree. I don't think the analogy to mysql works here though. The rpm database is basically a collection of the rpm headers that belong to the content in /usr. A rollback of the system will also roll back that information. We wouldn't do that with actual user data. There is some relation of the data in the rpm db to eg /usr/share/info/dir. But then that one is constructed from other files in the system and could therefor just as well live in /var. Unlike the rpm headers that are not installed anywhere else. Also, what the special case is depends on the direction you are coming from. If everything in /usr needs to be owned by packages, not having the rpm db owned would be the special case :-) At the end of the day it's still a bit academic. I still wonder what the actual use case is. Also, rpm could in theory just generate a header into the DB that owns the DB itself :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer HRB 36809 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org