]> git.pld-linux.org Git - packages/rpm.git/blob - dbupgrade.sh
- add and use simple internal tool to reset LSN of rpm database
[packages/rpm.git] / dbupgrade.sh
1 #!/bin/sh
2
3 if /usr/lib/rpm/bin/rpmdb_reset -r lsn /var/lib/rpm/Packages ; then
4         /bin/rm --interactive=never -f /var/lib/rpm/__db.00* >/dev/null 2>/dev/null || :
5         /bin/rm --interactive=never -f /var/lib/rpm/log/* >/dev/null 2>/dev/null || :
6 else
7         echo
8         echo "rpm database conversion failed!"
9         echo
10         echo "You have to run:"
11         echo
12         echo "  /usr/lib/rpm/bin/rpmdb_reset -r lsn /var/lib/rpm/Packages"
13         echo "  /bin/rm -f /var/lib/rpm/__db.00*"
14         echo "  /bin/rm -f /var/lib/rpm/log/*"
15         echo "  /usr/lib/rpm/bin/dbconvert --rebuilddb"
16         echo
17         exit
18 fi
19
20 if ! /usr/lib/rpm/bin/dbconvert --rebuilddb; then
21         echo
22         echo "rpm database conversion failed!"
23         echo "You have to run  /usr/lib/rpm/bin/dbconvert manually"
24         echo
25 fi
This page took 0.0316 seconds and 4 git commands to generate.