[packages/rpm] - add V-R to rpm database backup dir

baggins baggins at pld-linux.org
Wed Sep 19 18:32:40 CEST 2012


commit e4dd6a34974f439c6a87624043f5616b2441ab58
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed Sep 19 18:32:24 2012 +0200

    - add V-R to rpm database backup dir

 rpm.spec | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index aac4b6a..1efbb19 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -1123,9 +1123,10 @@ fi
 %posttrans
 if [ -x %{_rpmlibdir}/bin/rpmdb_checkversion ] && \
 		! %{_rpmlibdir}/bin/rpmdb_checkversion -h /var/lib/rpm -d /var/lib/rpm ; then
-	if [ ! -e /var/lib/rpm.rpmbackup ] && %{__cp} -a /var/lib/rpm /var/lib/rpm.rpmbackup ; then
+	if [ ! -e /var/lib/rpm.rpmbackup-%{version}-%{release} ] && \
+			%{__cp} -a /var/lib/rpm /var/lib/rpm.rpmbackup-%{version}-%{release} ; then
 		echo
-		echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup"
+		echo "Backup of the rpm database has been created in /var/lib/rpm.rpmbackup-%{version}-%{release}"
 		echo
 	fi
 	if [ -x %{_rpmlibdir}/bin/dbconvert ]; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/e4dd6a34974f439c6a87624043f5616b2441ab58



More information about the pld-cvs-commit mailing list