summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2009-01-28 13:59:18 +0000
committerPascal Rigaux <pixel@mandriva.com>2009-01-28 13:59:18 +0000
commitb0740bb0a7329249cb0372fe589709b8c8abda6f (patch)
tree08a85bf4092514021d3d6c9cb72f0e4055d7eded /t
parent2c647329d1253cabcfe7628376370cb13c311a2e (diff)
downloadurpmi-b0740bb0a7329249cb0372fe589709b8c8abda6f.tar
urpmi-b0740bb0a7329249cb0372fe589709b8c8abda6f.tar.gz
urpmi-b0740bb0a7329249cb0372fe589709b8c8abda6f.tar.bz2
urpmi-b0740bb0a7329249cb0372fe589709b8c8abda6f.tar.xz
urpmi-b0740bb0a7329249cb0372fe589709b8c8abda6f.zip
- drop support for /etc/urpmi/media.d/*.cfg
(was partially broken, non documented and hopefully unused) (mostly reverting commit 234656 which introduced that feature)
Diffstat (limited to 't')
-rw-r--r--t/helper.pm26
-rw-r--r--t/superuser--addmedia.t22
2 files changed, 0 insertions, 48 deletions
diff --git a/t/helper.pm b/t/helper.pm
index 005eadfe..a7959dae 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -7,7 +7,6 @@ our @EXPORT = qw(need_root_and_prepare
urpmi_addmedia urpmi_removemedia urpmi_update
urpm_cmd run_urpm_cmd urpmi_cmd urpmi test_urpmi_fail urpme
urpmi_cfg set_urpmi_cfg_global_options
- create_media_d_cfg media_d_cfg
system_ system_should_fail
rpm_is_jbj_version
check_installed_fullnames check_installed_names check_nothing_installed
@@ -102,31 +101,6 @@ sub set_urpmi_cfg_global_options {
ok(urpm::cfg::dump_config(urpmi_cfg(), $config), 'set_urpmi_cfg_global_options');
}
-sub media_d_dir {
- "$::pwd/root/etc/urpmi/media.d";
-}
-sub media_d_cfg {
- my ($name) = @_;
- media_d_dir() . "/$name.cfg";
-}
-sub create_media_d_cfg {
- my ($name, @l) = @_;
-
- system("install -d " . media_d_dir());
- my $cfg = media_d_cfg($name);
- -e $cfg and die "$cfg already exists\n";
- open(my $F, '>', $cfg);
-
- my $cnt = 1;
- foreach my $h (@l) {
- my %h = %$h;
- my $section = delete $h{'with-dir'} || $cnt++;
- print $F "[$section]\n";
- print $F "$_ = $h->{$_}\n" foreach keys %$h;
- }
-}
-
-
sub system_ {
my ($cmd) = @_;
system($cmd);
diff --git a/t/superuser--addmedia.t b/t/superuser--addmedia.t
index d43cbd50..ffe2ff14 100644
--- a/t/superuser--addmedia.t
+++ b/t/superuser--addmedia.t
@@ -17,9 +17,6 @@ my @fields = qw(hdlist synthesis with_synthesis media_info_dir no-media-info lis
test_reconfig();
-try_media_d_1();
-try_media_d_2();
-
try_medium({}, '');
@@ -149,25 +146,6 @@ sub check_urpmi {
check_installed_and_remove(@names);
}
-sub try_media_d_1 {
- create_media_d_cfg($name, { name => $name, url => "$::pwd/media/$name" });
- check_urpmi($name);
-
- create_media_d_cfg($name2, { name => $name2, url => "$::pwd/media/$name2" });
- check_urpmi($name2);
-
- ok(unlink media_d_cfg($name));
- ok(unlink media_d_cfg($name2));
-}
-sub try_media_d_2 {
- create_media_d_cfg($name,
- { name => $name, url => "$::pwd/media/$name" },
- { name => $name2, url => "$::pwd/media/$name2" });
- check_urpmi($name, $name2);
-
- ok(unlink media_d_cfg($name));
-}
-
sub test_reconfig {
urpmi_addmedia("reconfig $::pwd/media/reconfig");
check_conf({ name => 'reconfig', url => "$::pwd/media/$name" });