summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-04 21:48:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-04 21:48:54 +0000
commit94262f00fc4b653bf284d2bc2a54caee69187717 (patch)
treee64172595cee34c65976a5c7ddb4bb4140aa9dbe /urpm/select.pm
parentd2bfbcbfd77050e1cb60289ceeb50d694e46019a (diff)
downloadurpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar
urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.gz
urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.bz2
urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.xz
urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.zip
cleanup
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index 5f5632a1..b5292c95 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -7,13 +7,11 @@ use urpm::util;
use urpm::sys;
use URPM;
-my $default_list = 'rpm,perl-URPM,perl-MDV-Distribconf,urpmi,meta-task,glibc';
+my $default_priority_list = 'rpm,perl-URPM,perl-MDV-Distribconf,urpmi,meta-task,glibc';
+my @priority_list = split(',', $default_priority_list);
sub add_packages_to_priority_upgrade_list {
- my (@packages) = @_;
- @packages = grep { $default_list !~ /,$_\b/ } @packages;
- return if !@packages;
- $default_list .= join(',', '', @packages);
+ @priority_list = uniq(@priority_list, @_);
}
sub set_priority_upgrade_option {
@@ -23,7 +21,7 @@ sub set_priority_upgrade_option {
# comma-separated list of packages that should be installed first,
# and that trigger an urpmi restart
- my $list = $default_list;
+ my $list = join(',', @priority_list);
if ($previous) {
if ($previous eq $list) {
$list = '';