diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 15:47:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-06-18 15:47:43 +0000 |
commit | 48d17aecfbe7938e796fec388f5d357da761cba2 (patch) | |
tree | a50884815778c8b25039dc503e2664d8dcf8211d /t/superuser--addmedia.t | |
parent | b2acbfd301f16263d7d7b2a68042b24ff0209596 (diff) | |
download | urpmi-48d17aecfbe7938e796fec388f5d357da761cba2.tar urpmi-48d17aecfbe7938e796fec388f5d357da761cba2.tar.gz urpmi-48d17aecfbe7938e796fec388f5d357da761cba2.tar.bz2 urpmi-48d17aecfbe7938e796fec388f5d357da761cba2.tar.xz urpmi-48d17aecfbe7938e796fec388f5d357da761cba2.zip |
- urpmi.addmedia --distrib, urpmi/urpme/urpmf/urpmq --use-distrib
o media.cfg per media field hdlist=hdlist_xxx.cz is not used anymore,
xxx/media_info/hdlist.cz is used instead. To get previous behaviour, use
option --use-copied-hdlist or use_copied_hdlist=1 in media.cfg
beware: this modifies the behaviour of urpmi, especially for multi CDs media
which were the only one really using the hdlist-copied-in-media/media_info
feature
Diffstat (limited to 't/superuser--addmedia.t')
-rw-r--r-- | t/superuser--addmedia.t | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/t/superuser--addmedia.t b/t/superuser--addmedia.t index 661dce19..87941c35 100644 --- a/t/superuser--addmedia.t +++ b/t/superuser--addmedia.t @@ -42,17 +42,22 @@ try_medium({ synthesis => 1, "with ../media_info/synthesis.hdlist_$name.cz", "with ../media_info/synthesis.hdlist_$name2.cz"); -try_distrib({ hdlist => 1, +try_distrib({ media_info_dir => 'media_info' }, ''); +try_distrib({ hdlist => 1, media_info_dir => 'media_info' }, + '--probe-hdlist'); +try_distrib({ synthesis => 1, media_info_dir => 'media_info' }, + '--probe-synthesis'); +try_distrib_removable({ hdlist => 1, with_hdlist => "../..//media/media_info/hdlist_$name.cz", with_hdlist2 => "../..//media/media_info/hdlist_$name2.cz", with_hdlist3 => "../..//media/media_info/hdlist_$name3.cz" }, ''); -try_distrib({ hdlist => 1, +try_distrib_removable({ hdlist => 1, with_hdlist => "../..//media/media_info/hdlist_$name.cz", with_hdlist2 => "../..//media/media_info/hdlist_$name2.cz", with_hdlist3 => "../..//media/media_info/hdlist_$name3.cz" }, '--probe-hdlist'); -try_distrib({ synthesis => 1, +try_distrib_removable({ synthesis => 1, with_hdlist => "../..//media/media_info/synthesis.hdlist_$name.cz", with_hdlist2 => "../..//media/media_info/synthesis.hdlist_$name2.cz", with_hdlist3 => "../..//media/media_info/synthesis.hdlist_$name3.cz" }, @@ -71,13 +76,23 @@ sub try_medium { sub try_distrib { my ($want, $options) = @_; + my $want3 = { %$want, ignore => 1 }; + + try_distrib_($want, $want3, $options); + + $want3->{virtual} = $want->{virtual} = 1; + try_distrib_($want, $want3, '--virtual ' . $options); +} + +sub try_distrib_removable { + my ($want, $options) = @_; my $want2 = { %$want, with_hdlist => $want->{with_hdlist2} || $want->{with_hdlist} }; my $want3 = { %$want, with_hdlist => $want->{with_hdlist3} || $want->{with_hdlist}, ignore => 1 }; - try_distrib_($want, $want2, $want3, $options); + try_distrib_removable_($want, $want2, $want3, $options); $want3->{virtual} = $want2->{virtual} = $want->{virtual} = 1; - try_distrib_($want, $want2, $want3, '--virtual ' . $options); + try_distrib_removable_($want, $want2, $want3, '--virtual ' . $options); } sub try_medium_ { @@ -96,9 +111,18 @@ sub try_medium_ { } sub try_distrib_ { - my ($want, $want2, $want3, $options) = @_; + my ($want, $want3, $options) = @_; urpmi_addmedia("--distrib $name $::pwd $options"); + check_conf($want, $want, $want3); + check_urpmi($name, $name2); + urpmi_removemedia('-a'); +} + +sub try_distrib_removable_ { + my ($want, $want2, $want3, $options) = @_; + + urpmi_addmedia("--distrib $name $::pwd $options --use-copied-hdlist"); check_conf($want, $want2, $want3); check_urpmi($name, $name2); urpmi_removemedia('-a'); |