summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xurpmq28
1 files changed, 12 insertions, 16 deletions
diff --git a/urpmq b/urpmq
index e0c2159a..0c6fe0cf 100755
--- a/urpmq
+++ b/urpmq
@@ -205,28 +205,24 @@ if ($options{list_aliases}) {
} else {
%requested = $urpm->register_rpms(@files);
- #- search the packages according to the selection given by the user.
- if (@names) {
+ my $search_packages = sub {
+ my ($names, %more_options) = @_;
+
urpm::select::search_packages($urpm,
- \%requested,
- [ @names ],
+ \%requested, $names,
use_provides => $options{use_provides},
fuzzy => $urpm->{options}{fuzzy},
caseinsensitive => $options{caseinsensitive},
- all => $options{all},
- ) or $options{force}
- or exit 1;
+ %more_options,
+ );
+ };
+
+ #- search the packages according to the selection given by the user.
+ if (@names) {
+ $search_packages->(\@names, all => $options{all}) or $options{force} or exit 1;
}
if (@src_names) {
- urpm::select::search_packages($urpm,
- \%requested,
- [ @src_names ],
- use_provides => $options{use_provides},
- fuzzy => $urpm->{options}{fuzzy},
- caseinsensitive => $options{caseinsensitive},
- src => 1,
- ) or $options{force}
- or exit 1;
+ $search_packages->(\@src_names, src => 1) or $options{force} or exit 1;
}
#- keep track of choices, don't propagate but mark them selected.