Adjust rpmdb path for all remaining non-fakeroot runs
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 1 Apr 2011 14:48:07 +0000 (17:48 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 1 Apr 2011 14:50:08 +0000 (17:50 +0300)
- Executing rpmbuild in the fakeroot gets fairly tricky, especially
  for the tests that actually compile things. Overriding the dbpath
  prevents it from accessing system rpmdb for keyring and build-requires.
- With this patch, the test-suite now passes the smoke-test of
  "chmod go-rx /var/lib/rpm" on system rpmdb.

tests/atlocal.in
tests/local.at

index d0ea0c8..fecd950 100644 (file)
@@ -24,7 +24,7 @@ RPM_XFAIL=${RPM_XFAIL-1}
 
 function run()
 {
-    "$@" --define "_topdir ${TOPDIR}"
+    "$@" --define "_topdir ${TOPDIR}" --dbpath="${RPMTEST}/var/lib/rpm/"
 }
 
 function runroot()
index b90855b..2ab1319 100644 (file)
@@ -5,7 +5,7 @@ runroot rpm --initdb
 ]])
 
 m4_define([RPMDB_CLEAR],[[
-rm -rf "${abs_builddir}"/testing`run rpm --eval '%_dbpath'`/*
+rm -rf "${abs_builddir}"/testing`rpm --eval '%_dbpath'`/*
 ]])
 
 m4_define([RPMPY_RUN],[