[packages/rpm] - more verbose posttrans
baggins
baggins at pld-linux.org
Wed Sep 19 14:52:50 CEST 2012
commit 91049ef37494911bf35044ed648dde6def212436
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Sep 19 14:52:34 2012 +0200
- more verbose posttrans
rpm.spec | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 788418d..aac4b6a 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -1123,12 +1123,19 @@ fi
%posttrans
if [ -x %{_rpmlibdir}/bin/rpmdb_checkversion ] && \
! %{_rpmlibdir}/bin/rpmdb_checkversion -h /var/lib/rpm -d /var/lib/rpm ; then
- if %{__cp} -a /var/lib/rpm /var/lib/rpm.rpmbackup ; then
+ if [ ! -e /var/lib/rpm.rpmbackup ] && %{__cp} -a /var/lib/rpm /var/lib/rpm.rpmbackup ; then
echo
echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup"
echo
fi
- [ -x %{_rpmlibdir}/bin/dbconvert ] && %{_rpmlibdir}/bin/dbconvert --rebuilddb
+ if [ -x %{_rpmlibdir}/bin/dbconvert ]; then
+ if ! %{_rpmlibdir}/bin/dbconvert --rebuilddb ; then
+ echo
+ echo "rpm database conversion failed!"
+ echo "You have to run %{_rpmlibdir}/bin/dbconvert manually"
+ echo
+ fi
+ fi
fi
%triggerpostun -- %{name} < 4.4.9-44
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/91049ef37494911bf35044ed648dde6def212436
More information about the pld-cvs-commit
mailing list