From 10a19b68716ff7247f9d42540364f5bcd51d6e45 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 30 Jan 2002 14:59:57 +0000 Subject: 3.2-6mdk --- urpm.pm | 30 ++++++++++++++---------------- urpmi.spec | 5 ++++- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/urpm.pm b/urpm.pm index 449261cf..1e65b6b7 100644 --- a/urpm.pm +++ b/urpm.pm @@ -1791,29 +1791,27 @@ sub upload_source_packages { my $medium = $urpm->{media}[$id]; $media{$id} = undef; if (my ($prefix, $dir) = $medium->{url} =~ /^(removable[^:]*|file):\/(.*)/) { - my $count_not_found = sub { - my $not_found; + my $check_notfound = sub { if (-e $dir) { foreach (values %{$list->[$id]}) { /^(removable_?[^_:]*|file):\/(.*\/([^\/]*))/ or next; - -r $2 or ++$not_found; + -r $2 or return 1; } } else { - $not_found = values %{$list->[$id]}; + return 2; } - return $not_found; + return 0; }; - while ($count_not_found->()) { - #- the directory given does not exist or may be accessible - #- by mounting some other. try to figure out these directory and - #- mount everything necessary. - unless ($urpm->try_mounting($dir)) { - $ask_for_medium or - $urpm->{fatal}(4, _("medium \"%s\" is not selected", $medium->{name})); - $urpm->try_umounting($dir); system("eject", $device); - $ask_for_medium->($medium->{name}, $medium->{removable}) or - $urpm->{fatal}(4, _("medium \"%s\" is not selected", $medium->{name})); - } + #- the directory given does not exist or may be accessible + #- by mounting some other. try to figure out these directory and + #- mount everything necessary. + $urpm->try_mounting($dir); + while ($check_notfound->()) { + $ask_for_medium or $urpm->{fatal}(4, _("medium \"%s\" is not selected", $medium->{name})); + $urpm->try_umounting($dir); system("eject", $device); + $ask_for_medium->($medium->{name}, $medium->{removable}) or + $urpm->{fatal}(4, _("medium \"%s\" is not selected", $medium->{name})); + $urpm->try_mounting($dir); } if (-e $dir) { my @removable_sources; diff --git a/urpmi.spec b/urpmi.spec index 39dc4d59..722ac8d3 100644 --- a/urpmi.spec +++ b/urpmi.spec @@ -2,7 +2,7 @@ Name: urpmi Version: 3.2 -Release: 5mdk +Release: 6mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -144,6 +144,9 @@ fi %changelog +* Wed Jan 30 2002 François Pons 3.2-6mdk +- fixed some case where removable device are not ejected. + * Tue Jan 29 2002 François Pons 3.2-5mdk - added -y options to urpmi/urpmq to impose fuzzy search. - cleaned dependancy resolver algorithm. -- cgit v1.2.1