summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-11 16:05:17 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-11 16:05:17 +0000
commitc399875bd8b97f3492bb13ba693ff757b079e793 (patch)
treecab524d0e3a2d3802adf3565c2019809c42f536f
parent0c26589540883fcfb140112b36a8a63c4d52faa0 (diff)
downloadurpmi-c399875bd8b97f3492bb13ba693ff757b079e793.tar
urpmi-c399875bd8b97f3492bb13ba693ff757b079e793.tar.gz
urpmi-c399875bd8b97f3492bb13ba693ff757b079e793.tar.bz2
urpmi-c399875bd8b97f3492bb13ba693ff757b079e793.tar.xz
urpmi-c399875bd8b97f3492bb13ba693ff757b079e793.zip
Don't remove basesystem packages when installing other ones
-rwxr-xr-xurpmi10
1 files changed, 10 insertions, 0 deletions
diff --git a/urpmi b/urpmi
index 7254d94e..2606426c 100755
--- a/urpmi
+++ b/urpmi
@@ -406,6 +406,16 @@ if (@ask_unselect) {
my @ask_remove = $urpm->{options}{'allow-force'} ? @{[]} : $urpm->removed_packages($state);
if (@ask_remove) {
+ {
+ my $db = URPM::DB::open($root);
+ $urpm->find_removed_from_basesystem($db, $state, sub {
+ my $urpm = shift @_;
+ foreach (@_) {
+ $urpm->{error}(N("removing package %s will break your system", $_));
+ }
+ @_ and $no_remove = 1;
+ });
+ }
my $list = join "\n", $urpm->translate_why_removed($state, sort @ask_remove);
if ($no_remove && !$force) {