diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-11 13:39:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-11 13:39:48 +0000 |
commit | eba1850e5a76c1babd371b34c0c2768050903be7 (patch) | |
tree | 19e10c5ec20676883725f23d8f66fbe00429b54d | |
parent | 96b9d16075ef21941a1d9a676d9976270a336b33 (diff) | |
download | rpmdrake-eba1850e5a76c1babd371b34c0c2768050903be7.tar rpmdrake-eba1850e5a76c1babd371b34c0c2768050903be7.tar.gz rpmdrake-eba1850e5a76c1babd371b34c0c2768050903be7.tar.bz2 rpmdrake-eba1850e5a76c1babd371b34c0c2768050903be7.tar.xz rpmdrake-eba1850e5a76c1babd371b34c0c2768050903be7.zip |
(do_search) fix canceling description search (maybe should we just use
_iterate_on_nodes() directly??
-rwxr-xr-x | rpmdrake | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -146,18 +146,25 @@ sub do_search($$$$$$$) { } } } else { - urpm::xml_info::do_something_with_nodes( - 'info', - $xml_info_file, - sub { - my ($node) = @_; - $update_search_pb->(); - push @search_results, $node->{fn} if $node->{description} =~ $entry_rx; - #$searchstop and last; - return 0 || $searchstop; - }, - ); - } + eval { + urpm::xml_info::do_something_with_nodes( + 'info', + $xml_info_file, + sub { + $searchstop and die 'search aborted'; + my ($node) = @_; + $update_search_pb->(); + push @search_results, $node->{fn} if $node->{description} =~ $entry_rx; + #$searchstop and last; + return 0 || $searchstop; + }, + ); + }; + my $err = $@; + if ($err =~ /search aborted/) { + my $wait = statusbar_msg(N("Search aborted"), 1); + } + } } end_search: |