diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-11 16:05:17 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-04-11 16:05:17 +0000 |
commit | c399875bd8b97f3492bb13ba693ff757b079e793 (patch) | |
tree | cab524d0e3a2d3802adf3565c2019809c42f536f | |
parent | 0c26589540883fcfb140112b36a8a63c4d52faa0 (diff) | |
download | urpmi-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-x | urpmi | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) { |