summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-28 11:51:27 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-28 11:51:27 +0000
commit6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0 (patch)
tree87f257079174e32f931205733ed1d97d20fad035 /urpm/select.pm
parent13258c86d966b9bf5abd71a4a892a2c7350d7ff0 (diff)
downloadurpmi-6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0.tar
urpmi-6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0.tar.gz
urpmi-6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0.tar.bz2
urpmi-6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0.tar.xz
urpmi-6dc554230ca73e99fbc1ac5fdd2a3ccd0c9f32e0.zip
- urpmi
o handle changes in priority-upgrade list between old and new urpmi (#32925) nb: keep --no-priority-upgrade since it is passed by older urpmi when restarting
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm19
1 files changed, 19 insertions, 0 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 0300395e..fd57be04 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -7,6 +7,25 @@ use urpm::util;
use urpm::sys;
use URPM;
+sub set_priority_upgrade_option {
+ my ($urpm, $previous) = @_;
+
+ exists $urpm->{options}{'priority-upgrade'} and return;
+
+ # comma-separated list of packages that should be installed first,
+ # and that trigger an urpmi restart
+ my $list = 'rpm,perl-URPM,perl-MDV-Distribconf,urpmi,meta-task,glibc';
+ if ($previous) {
+ if ($previous eq $list) {
+ $list = '';
+ $urpm->{log}(N("urpmi was restarted, and the list of priority packages did not change"));
+ } else {
+ $urpm->{log}(N("urpmi was restarted, and the list of priority packages did change: %s vs %s", $previous, $list));
+ }
+ }
+ $urpm->{options}{'priority-upgrade'} = $list;
+}
+
sub _findindeps {
my ($urpm, $found, $qv, $v, $caseinsensitive, $src) = @_;