aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-11 13:39:48 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-11 13:39:48 +0000
commiteba1850e5a76c1babd371b34c0c2768050903be7 (patch)
tree19e10c5ec20676883725f23d8f66fbe00429b54d
parent96b9d16075ef21941a1d9a676d9976270a336b33 (diff)
downloadrpmdrake-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-xrpmdrake31
1 files changed, 19 insertions, 12 deletions
diff --git a/rpmdrake b/rpmdrake
index 2c6181a3..e2e13b20 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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: