01.02.2019 22:10, Carlos E. R. пишет:
bor@bor-Latitude-E5450:~/src/rpm$ grep rebuilddb rpmpopt.in rpm exec --rebuilddb rpmdb --rebuilddb
Interestingly, the command deleted /var/lib/rpm
No, it did not. It does not know anything about /var/lib/rpm at all.
It certainly did. I had /var/lib/rpm open in 'mc' and it disappeared. A symlink appeared in its place to ../../usr/lib/sysimage/rpm. I undid it from backup and restored /var/lib/rpm with contents, then deleted /usr/lib/sysimage/rpm.
If you insist on breaking your installation it is up to you. Except that rpm does *NOT* use /var/lib/rpm by default. If it does use it, it means you have non-default %_dbpath setting somewhere.
(and my backups!) and created instead a symlink to ../../usr/lib/sysimage/rpm
rpmdb is located /usr/lib/sysimage/rpm in Leap 15 and TW. /var/lib/rpm is just compatibility link.
The real "/var/lib/rpm" directory did exist in my 15.0 system, upgraded from 42.3.
Either update went wrong or you misinterpret what you see.
Something should have moved it, but did not. Probably I have to run rebuilddb and let it run to completion.
This "something" is "rpm" package script.
I'm absolutely certain because 'mc' was opened on /var/lib/rpm and after the command (which I aborted with ctrl-c) it complained the current directory did not exist.
I have no idea what mc does, and I'm not going to take it as ultimate wisdom. Unless you have actual directory listing of /var/lib and /usr/lib/sysimage at each point, I will continue to state that you misinterpret what you have seen.
Found my backup in "/usr/lib/sysimage/rpmold.29244/copia".
Which just proves that rpmdb worked on /usr/lib/sysimage exactly as it should. And that your old backups were under /usr/lib/sysimage as well which means /var/lib/rpm was link to /usr/lib/sysimage rpm when you created your backups. Show output of rpm --eval %_dbpath --eval %_dbpath_rebuild