summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-06 19:25:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-06 19:25:00 +0000
commited86b26f2820cb6ba08f41193bd4fbcdb5411b39 (patch)
tree156f0d801bab4de4e314e4ed0bfb76df39f75ff9 /urpm/select.pm
parentfe798025581578296bed1314302a562bc1076958 (diff)
downloadurpmi-ed86b26f2820cb6ba08f41193bd4fbcdb5411b39.tar
urpmi-ed86b26f2820cb6ba08f41193bd4fbcdb5411b39.tar.gz
urpmi-ed86b26f2820cb6ba08f41193bd4fbcdb5411b39.tar.bz2
urpmi-ed86b26f2820cb6ba08f41193bd4fbcdb5411b39.tar.xz
urpmi-ed86b26f2820cb6ba08f41193bd4fbcdb5411b39.zip
- modify infrastructure so that rpmdrake doesn't select all updates by
default (#38611) ie create resolve_priority_upgrades_after_auto_select() for use in rpmdrake
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 00991511..bd969311 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -266,9 +266,7 @@ sub resolve_dependencies {
#- first check if a priority_upgrade package is requested
#- (it should catch all occurences in --auto-select mode)
#- (nb: a package "foo" may appear twice, and only one will be set flag_upgrade)
- if (my @l = grep { $_->flag_upgrade } _priority_upgrade_pkgs($urpm, $options{priority_upgrade})) {
- $need_restart = _resolve_priority_upgrades($urpm, $db, $state, $requested, \@l, %options);
- }
+ $need_restart = resolve_priority_upgrades_after_auto_select($urpm, $db, $state, $requested, %options);
}
if (!$need_restart) {
@@ -292,6 +290,18 @@ sub _priority_upgrade_pkgs {
} split(/,/, $priority_upgrade_string);
}
+
+sub resolve_priority_upgrades_after_auto_select {
+ my ($urpm, $db, $state, $selected, %options) = @_;
+
+ my $need_restart;
+
+ if (my @l = grep { $_->flag_upgrade } _priority_upgrade_pkgs($urpm, $options{priority_upgrade})) {
+ $need_restart = _resolve_priority_upgrades($urpm, $db, $state, $selected, \@l, %options);
+ }
+ $need_restart;
+}
+
sub _resolve_priority_upgrades {
my ($urpm, $db, $state, $selected, $priority_pkgs, %options) = @_;