summaryrefslogtreecommitdiffstats
path: root/gurpmi2
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-21 18:50:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-21 18:50:52 +0000
commit3d6b7b8b4823e1a60b676c86e10358ee45bb70da (patch)
treeefe803426188fe7f7014c59631e29ec586f62b25 /gurpmi2
parent041901039275532d0834fa86e5516509c615728f (diff)
downloadurpmi-3d6b7b8b4823e1a60b676c86e10358ee45bb70da.tar
urpmi-3d6b7b8b4823e1a60b676c86e10358ee45bb70da.tar.gz
urpmi-3d6b7b8b4823e1a60b676c86e10358ee45bb70da.tar.bz2
urpmi-3d6b7b8b4823e1a60b676c86e10358ee45bb70da.tar.xz
urpmi-3d6b7b8b4823e1a60b676c86e10358ee45bb70da.zip
move many functions from urpm.pm to new module urpm/select.pm
Diffstat (limited to 'gurpmi2')
-rwxr-xr-xgurpmi213
1 files changed, 7 insertions, 6 deletions
diff --git a/gurpmi2 b/gurpmi2
index 62a12b17..488753fb 100755
--- a/gurpmi2
+++ b/gurpmi2
@@ -16,6 +16,7 @@ use urpm::install;
use urpm::media;
use urpm::signature;
use urpm::get_pkgs;
+use urpm::select;
use Gtk2;
#- GUI globals
@@ -71,19 +72,19 @@ my $urpm = configure_urpm();
my $state = {};
my %requested = $urpm->register_rpms(@all_rpms);
if (@gurpmi::names) {
- $urpm->search_packages(\%requested, [ @gurpmi::names ]);
+ urpm::select::search_packages($urpm, \%requested, [ @gurpmi::names ]);
}
-$urpm->resolve_dependencies(
+urpm::select::resolve_dependencies($urpm,
$state,
\%requested,
callback_choices => \&ask_choice,
auto_select => $gurpmi::options{'auto-select'},
);
-my @ask_unselect = $urpm->unselected_packages($state);
+my @ask_unselect = urpm::select::unselected_packages($urpm, $state);
@ask_unselect
? ask_continue(N(
"Some requested packages cannot be installed:\n%s\nContinue installation anyway?",
- $urpm->translate_why_unselected($state, @ask_unselect)
+ urpm::select::translate_why_unselected($urpm, $state, @ask_unselect)
), \&do_install)
: do_install();
@@ -186,11 +187,11 @@ sub ask_continue_blocking {
sub do_install {
wait_label();
- my @ask_remove = $urpm->removed_packages($state);
+ my @ask_remove = urpm::select::removed_packages($urpm, $state);
@ask_remove
? ask_continue(N(
"The following packages have to be removed for others to be upgraded:\n%s\nContinue installation anyway?",
- $urpm->translate_why_removed($state, @ask_remove)
+ urpm::select::translate_why_removed($urpm, $state, @ask_remove)
), \&do_install_2)
: goto &do_install_2;
}