diff options
-rw-r--r-- | urpm.pm | 4 | ||||
-rwxr-xr-x | urpmi | 5 | ||||
-rw-r--r-- | urpmi.spec | 12 | ||||
-rwxr-xr-x | urpmq | 7 |
4 files changed, 24 insertions, 4 deletions
@@ -2982,7 +2982,9 @@ sub translate_why_unselected { my @unsatisfied = @{$rb->{unsatisfied} || []}; my $s = join ", ", ((map { N("due to missing %s", $_) } @froms), (map { N("due to unsatisfied %s", $_) } @unsatisfied), - $rb->{promote} ? N("trying to promote %s by selection of %s", $rb->{promote}, $rb->{psel}) : @{[]}); + $rb->{promote} && !$rb->{keep} ? N("trying to promote %s", join(", ", @{$rb->{promote}})) : @{[]}, + $rb->{keep} ? N("in order to keep %s", join(", ", @{$rb->{keep}})) : @{[]}, + ); $_ . ($s ? " ($s)" : ''); } @l; } @@ -31,6 +31,7 @@ my $synthesis = ''; my $auto = 0; my $allow_medium_change = 0; my $auto_select = 0; +my $keep = 0; my $no_remove = 0; my $split_level = 20; my $split_length = 1; @@ -81,6 +82,8 @@ usage: ") . N(" --auto - automatically select a package in choices. ") . N(" --auto-select - automatically select packages to upgrade the system. ") . N(" --no-uninstall - never ask to uninstall a package, abort the installation. +") . N(" --keep - keep existing packages if possible, reject requested + packages that leads to remove. ") . N(" --split-level - split in small transaction if more than given packages are going to be installed or upgraded, default is %d. @@ -153,6 +156,7 @@ while (defined($_ = shift @ARGV)) { /^--allow-medium-change$/ and do { $allow_medium_change = 1; next }; /^--auto-select$/ and do { $auto_select = 1; next }; /^--no-(remove|uninstall)$/ and do { $no_remove = 1; next }; + /^--keep$/ and do { $keep = 1; next }; /^--split-level$/ and do { push @nextargv, \$urpm->{options}{'split-level'}; next }; /^--split-length$/ and do { push @nextargv, \$urpm->{options}{'split-length'}; next }; /^--(no-)?fuzzy$/ and do { $urpm->{options}{fuzzy} = !$1; next }; @@ -395,6 +399,7 @@ $urpm->resolve_dependencies($state, \%requested, auto_select => $auto_select, callback_choices => \&ask_choice, install_src => $install_src, + keep => $keep, nodeps => $urpm->{options}{'allow-nodeps'} || $urpm->{options}{'allow-force'}, ); @@ -2,14 +2,14 @@ Name: urpmi Version: 4.4 -Release: 12mdk +Release: 13mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate Summary: User mode rpm install URL: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/urpmi Requires: eject webfetch perl-DateManip >= 5.40 gnupg -PreReq: perl-Locale-gettext >= 1.01-7mdk rpmtools >= 4.3-6mdk perl-URPM >= 0.91-7mdk +PreReq: perl-Locale-gettext >= 1.01-7mdk rpmtools >= 4.3-6mdk perl-URPM >= 0.92 BuildRequires: bzip2-devel gettext rpm-devel >= 4.0.3 perl-MDK-Common-devel BuildRoot: %{_tmppath}/%{name}-buildroot BuildArch: noarch @@ -202,6 +202,14 @@ $urpm->update_media(nolock => 1); %changelog +* Mon Jul 28 2003 François Pons <fpons@mandrakesoft.com> 4.4-13mdk +- fixed trying to promote ARRAY(...) message. +- fixed output of urpmq to be sorted. +- added support for --keep in urpmi and urpmq to give an hint + for resolving dependencies about trying to keep existing + packages instead of removing them. +- added some translations to french man page of urpmi. + * Mon Jul 28 2003 François Pons <fpons@mandrakesoft.com> 4.4-12mdk - avoid spliting transaction if --test is used. @@ -42,6 +42,8 @@ usage: ") . N(" --synthesis - use the synthesis given instead of urpmi db. ") . N(" --auto-select - automatically select packages to upgrade the system. ") . N(" --fuzzy - impose fuzzy search (same as -y). +") . N(" --keep - keep existing packages if possible, reject requested + packages that leads to remove. ") . N(" --list - list available packages. ") . N(" --list-media - list available media. ") . N(" --list-nodes - list available nodes when using --parallel. @@ -93,6 +95,7 @@ while (defined($_ = shift @ARGV)) { /^--synthesis$/ and do { push @nextargv, \$query->{synthesis}; next }; /^--auto-select$/ and do { $query->{deps} = $query->{upgrade} = $query->{auto_select} = 1; next }; /^--fuzzy$/ and do { $query->{fuzzy} = 1; next }; + /^--keep$/ and do { $query->{keep} = 1; next }; /^--list$/ and do { $query->{list} = 1; next }; /^--list-media$/ and do { $query->{list_media} = 1; next }; /^--list-nodes$/ and do { $query->{list_nodes} = 1; next }; @@ -298,6 +301,7 @@ if ($query->{list_aliases}) { } } elsif ($query->{auto_select} || $query->{upgrade}) { $urpm->resolve_dependencies($state, \%requested, + keep => $query->{keep}, rpmdb => $query->{env} && "$query->{env}/rpmdb.cz", auto_select => $query->{auto_select}, callback_choices => $stop_on_choices); @@ -421,7 +425,8 @@ if ($query->{complete}) { } } } -foreach my $id ($state->{selected} ? keys %{$state->{selected}} : keys %requested) { +foreach my $id (sort { eval { $urpm->{depslist}[$a]->name cmp $urpm->{depslist}[$b]->name } || $a <=> $b } + $state->{selected} ? keys %{$state->{selected}} : keys %requested) { my $class = $state->{selected}{$id} || $requested{$id}; if (ref($class) eq 'ARRAY') { foreach my $choices (@{$class || []}) { |