diff options
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -57,6 +57,7 @@ sub new { my ($class) = @_; bless { config => "/etc/urpmi/urpmi.cfg", + skiplist => "/etc/urpmi/skip.list", depslist => "/var/lib/urpmi/depslist.ordered", provides => "/var/lib/urpmi/provides", compss => "/var/lib/urpmi/compss", @@ -1113,6 +1114,21 @@ sub filter_minimal_packages_to_upgrade { } } +#- get out of package that should not be upgraded. +sub deselect_unwanted_packages { + my ($urpm, $packages) = @_; + + my %skip; + local ($_, *F); + open F, $urpm->{skiplist}; + while (<F>) { + chomp; s/#.*$//; s/^\s*//; s/\s*$//; + my $pkg = $urpm->{params}{info}{$_} or next; + exists $packages->{$pkg->{id}} && defined $packages->{$pkg->{id}} and delete $packages->{$pkg->{id}}; + } + close F; +} + #- select source for package selected. #- according to keys given in the packages hash. #- return a list of list containing the source description for each rpm, |