diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-04 21:48:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-04 21:48:54 +0000 |
commit | 94262f00fc4b653bf284d2bc2a54caee69187717 (patch) | |
tree | e64172595cee34c65976a5c7ddb4bb4140aa9dbe /urpm | |
parent | d2bfbcbfd77050e1cb60289ceeb50d694e46019a (diff) | |
download | urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.gz urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.bz2 urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.tar.xz urpmi-94262f00fc4b653bf284d2bc2a54caee69187717.zip |
cleanup
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/select.pm | 10 |
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 = ''; |