summaryrefslogtreecommitdiffstats
path: root/t/superuser--media_info_dir.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-12-01 10:35:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-12-01 10:35:30 +0000
commitc3df5e0f2d48dadc17a44c966b85361cbb53b3a8 (patch)
treee08f8109412ad0b5e9a23ef4a81044586e7514de /t/superuser--media_info_dir.t
parent1a8a281a23d1324a8c447a93c3e12e213908723d (diff)
downloadurpmi-c3df5e0f2d48dadc17a44c966b85361cbb53b3a8.tar
urpmi-c3df5e0f2d48dadc17a44c966b85361cbb53b3a8.tar.gz
urpmi-c3df5e0f2d48dadc17a44c966b85361cbb53b3a8.tar.bz2
urpmi-c3df5e0f2d48dadc17a44c966b85361cbb53b3a8.tar.xz
urpmi-c3df5e0f2d48dadc17a44c966b85361cbb53b3a8.zip
add some *old* pkgs (from redhat 4.0) to test rpm&URPM handle it correctly
so that bug #27263 won't happen again :)
Diffstat (limited to 't/superuser--media_info_dir.t')
-rw-r--r--t/superuser--media_info_dir.t38
1 files changed, 31 insertions, 7 deletions
diff --git a/t/superuser--media_info_dir.t b/t/superuser--media_info_dir.t
index bfa2be56..9cb623f0 100644
--- a/t/superuser--media_info_dir.t
+++ b/t/superuser--media_info_dir.t
@@ -7,13 +7,37 @@ use Test::More 'no_plan';
need_root_and_prepare();
+various();
+rpm_v3();
-my $name = 'various';
+sub various {
+ my $name = 'various';
+ foreach my $medium_name ('various', 'various_nohdlist', 'various_no_subdir') {
+ urpmi_addmedia("$medium_name $::pwd/media/$medium_name");
+ urpmi($name);
+ is(`rpm -qa --root $::pwd/root`, "$name-1-1\n");
+ urpme($name);
+ urpmi_removemedia($medium_name);
+ }
+}
+
+sub rpm_v3 {
+ my @names = qw(libtermcap nls p2c);
+ my $check_installed = sub {
+ is(`rpm -qa --qf '%{name}\\n' --root $::pwd/root | sort`, join('', map { "$_\n" } @names));
+ };
+
+ system_("rpm --root $::pwd/root -i --noscripts media/rpm-v3/*.rpm");
+ $check_installed->();
+ system_("rpm --root $::pwd/root -e --noscripts " . join(' ', @names));
+ is(`rpm -qa --root $::pwd/root`, '');
-foreach my $medium_name ('various', 'various_nohdlist', 'various_no_subdir') {
- urpmi_addmedia("$medium_name $::pwd/media/$medium_name");
- urpmi($name);
- is(`rpm -qa --root $::pwd/root`, "$name-1-1\n");
- urpme($name);
- urpmi_removemedia($medium_name);
+ foreach my $medium_name ('rpm-v3', 'rpm-v3_nohdlist', 'rpm-v3_no_subdir') {
+ urpmi_addmedia("$medium_name $::pwd/media/$medium_name");
+ urpmi('--no-verify-rpm --noscripts ' . join(' ', @names));
+ $check_installed->();
+ urpme('-a --auto --noscripts');
+ is(`rpm -qa --root $::pwd/root`, '');
+ urpmi_removemedia($medium_name);
+ }
}