summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-25 15:48:07 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-25 15:48:07 +0000
commit8b9ea10d4fa56c53c50769852dade0ed771da53d (patch)
treef32ec462aeb06df5193868f2fadc19cf94a9d234 /urpm.pm
parent7930b1291d825623bbb9c54b732e1758781e7ebc (diff)
downloadurpmi-8b9ea10d4fa56c53c50769852dade0ed771da53d.tar
urpmi-8b9ea10d4fa56c53c50769852dade0ed771da53d.tar.gz
urpmi-8b9ea10d4fa56c53c50769852dade0ed771da53d.tar.bz2
urpmi-8b9ea10d4fa56c53c50769852dade0ed771da53d.tar.xz
urpmi-8b9ea10d4fa56c53c50769852dade0ed771da53d.zip
Add support for a prohibit-remove option in urpmi.cfg
(Michael Scherer)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index de0715e4..8c9c7a96 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -148,6 +148,7 @@ sub read_config {
post-clean
pre-clean
priority-upgrade
+ prohibit-remove
resume
retry
split-length
@@ -3118,8 +3119,9 @@ sub find_removed_from_basesystem {
my ($urpm, $db, $state, $callback_base) = @_;
if ($callback_base && %{$state->{rejected} || {}}) {
my %basepackages;
+ my @dont_remove = ('basesystem', split /,\s*/, $urpm->{global_config}{'prohibit-remove'});
#- check if a package to be removed is a part of basesystem requires.
- $db->traverse_tag('whatprovides', [ 'basesystem' ], sub {
+ $db->traverse_tag('whatprovides', \@dont_remove, sub {
my ($p) = @_;
$basepackages{$p->fullname} = 0;
});