[packages/rpm/db52] - clearer logic
baggins
baggins at pld-linux.org
Sun Nov 25 19:41:54 CET 2012
commit d076ae46506d528cdc13ef61c08bfcafb0ec7844
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Nov 25 19:37:12 2012 +0100
- clearer logic
dbupgrade.sh | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/dbupgrade.sh b/dbupgrade.sh
index 0f035b2..52c073a 100755
--- a/dbupgrade.sh
+++ b/dbupgrade.sh
@@ -1,9 +1,6 @@
#!/bin/sh
-if /usr/lib/rpm/bin/rpmdb_reset -r lsn /var/lib/rpm/Packages ; then
- /bin/rm --interactive=never -f /var/lib/rpm/__db.00* >/dev/null 2>/dev/null || :
- /bin/rm --interactive=never -f /var/lib/rpm/log/* >/dev/null 2>/dev/null || :
-else
+if ! /usr/lib/rpm/bin/rpmdb_reset -r lsn /var/lib/rpm/Packages ; then
echo
echo "rpm database conversion failed!"
echo
@@ -14,12 +11,14 @@ else
echo " /bin/rm -f /var/lib/rpm/log/*"
echo " /usr/lib/rpm/bin/dbconvert --rebuilddb"
echo
- exit
-fi
+else
+ /bin/rm --interactive=never -f /var/lib/rpm/__db.00* >/dev/null 2>/dev/null || :
+ /bin/rm --interactive=never -f /var/lib/rpm/log/* >/dev/null 2>/dev/null || :
-if ! /usr/lib/rpm/bin/dbconvert --rebuilddb; then
- echo
- echo "rpm database conversion failed!"
- echo "You have to run /usr/lib/rpm/bin/dbconvert manually"
- echo
+ if ! /usr/lib/rpm/bin/dbconvert --rebuilddb; then
+ echo
+ echo "rpm database conversion failed!"
+ echo "You have to run /usr/lib/rpm/bin/dbconvert manually"
+ echo
+ fi
fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/3fc92bf76cefba36714ca3a778c56bab474399bd
More information about the pld-cvs-commit
mailing list