On 01/02/2019 19.37, Andrei Borzenkov wrote:
01.02.2019 15:32, Carlos E. R. пишет:
On 01/02/2019 13.21, Carlos E. R. wrote:
On 01/02/2019 13.09, Andrei Borzenkov wrote:
Or create a temporary copy of the files and try the command.
Ok, both commands run.
--rebuilddb (and --inittdb) was provided by rpm in the past and was moved in separate rpmdb binary 8 years ago. "rpm --rebuilddb" is redirected to this binary via popt alias.
Ah. That explains it.
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.
(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. Something should have moved it, but did not. Probably I have to run rebuilddb and let it run to completion. 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.
Found my backup in "/usr/lib/sysimage/rpmold.29244/copia".
So nothing was deleted.
Yes, /var/lib/rpm was "moved" aka deleted. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)