summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-27 08:51:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-27 08:51:46 +0000
commit5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e (patch)
treee97e27df17c0890d4eda03121ca07cbae1546175
parent9237fafda22ac56868f893e7bec717adf794035e (diff)
downloadurpmi-5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e.tar
urpmi-5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e.tar.gz
urpmi-5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e.tar.bz2
urpmi-5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e.tar.xz
urpmi-5d9dc5e7611430e4b3fe7f16c0060cd47c31fa2e.zip
add a rebuilddb check (to detect bugs like #34181)
-rw-r--r--t/superuser--media_info_dir.t10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/superuser--media_info_dir.t b/t/superuser--media_info_dir.t
index ac5f6f9f..7ba9f0c9 100644
--- a/t/superuser--media_info_dir.t
+++ b/t/superuser--media_info_dir.t
@@ -26,6 +26,9 @@ sub rpm_v3 {
system_("rpm --root $::pwd/root -i --noscripts media/rpm-v3/*.i386.rpm");
check_installed_names(@names);
+ rebuilddb(); # why here? well, why not
+ check_installed_names(@names);
+
system_("rpm --root $::pwd/root -e --noscripts " . join(' ', @names));
is(`rpm -qa --root $::pwd/root`, '');
@@ -50,3 +53,10 @@ sub rpm_v3 {
is($arch, $wanted_arch, "$fullname should have arch $wanted_arch (found $arch)");
}
}
+
+sub rebuilddb {
+ # testing rebuilddb (could be done elsewhere, but here is
+ system_("rpm --root $::pwd/root --rebuilddb");
+ my ($dir) = glob("$::pwd/root/var/lib/rpmrebuilddb*");
+ is($dir, undef, "$dir should not be there");
+}