summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-07-28 15:15:05 +0000
committerFrancois Pons <fpons@mandriva.com>2003-07-28 15:15:05 +0000
commitecb2ba937d2cc0a9f864ab98c5e99a3872794a5c (patch)
tree6b9a84c478f75def748ccc708bfe7581fa4a9b04 /urpmq
parent8316b9108bfca41870f87c533c76efe62cbf7562 (diff)
downloadurpmi-ecb2ba937d2cc0a9f864ab98c5e99a3872794a5c.tar
urpmi-ecb2ba937d2cc0a9f864ab98c5e99a3872794a5c.tar.gz
urpmi-ecb2ba937d2cc0a9f864ab98c5e99a3872794a5c.tar.bz2
urpmi-ecb2ba937d2cc0a9f864ab98c5e99a3872794a5c.tar.xz
urpmi-ecb2ba937d2cc0a9f864ab98c5e99a3872794a5c.zip
4.4-13mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpmq b/urpmq
index cb11ee6e..7e26c46b 100755
--- a/urpmq
+++ b/urpmq
@@ -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 || []}) {