diff options
-rw-r--r-- | urpm.pm | 3 | ||||
-rwxr-xr-x | urpmf | 15 | ||||
-rwxr-xr-x | urpmi | 1 | ||||
-rw-r--r-- | urpmi.spec | 7 | ||||
-rwxr-xr-x | urpmq | 13 |
5 files changed, 36 insertions, 3 deletions
@@ -2162,7 +2162,8 @@ sub resolve_dependencies { sub create_transaction { my ($urpm, $state, %options) = @_; - if ($urpm->{parallel_handler} || !$options{split_length} || keys %{$state->{selected}} < $options{split_level}) { + if ($urpm->{parallel_handler} || !$options{split_length} || $options{nodeps} || + keys %{$state->{selected}} < $options{split_level}) { #- build simplest transaction (no split). $urpm->build_transaction_set(undef, $state, split_length => 0); } else { @@ -52,6 +52,8 @@ usage: ") . N(" --files - print tag files: all files. ") . N(" --conflicts - print tag conflicts: all conflicts. ") . N(" --obsoletes - print tag obsoletes: all obsoletes. +") . N(" --env - use specific environment (typically a bug + report). ") . N(" -i - ignore case distinctions in every pattern. ") . N(" -f - print version, release and arch with name. ") . N(" -e - include perl code directly as perl -e. @@ -75,6 +77,7 @@ my $quiet; my $uniq = ''; my $pattern = ''; my $full = ''; +my $env; my (%params, %uniq); #- parse arguments list. @@ -93,10 +96,11 @@ while (defined($_ = shift @ARGV)) { /^--uniq$/ and do { $uniq = 1; next }; /^--all$/ and do { $params{$_} = 1 foreach qw(filename group size summary description sourcerpm packager buildhost url - provides requires files conflicts obsoletes); next }; + provides requires files conflicts obsoletes); next }; /^--name$/ and do { $params{filename} = 1; next }; /^--(group|size|epoch|summary|description|sourcerpm|packager|buildhost|url|provides|requires|files|conflicts|obsoletes)$/ and do { $params{$1} = 1; next }; + /^--env$/ and do { $env = shift @ARGV; next }; /^-v$/ and do { $verbose = 1; next }; /^-q$/ and do { $quiet = 1; next }; /^-u$/ and do { $uniq = 1; next }; @@ -139,6 +143,15 @@ $urpm->{log}(N("callback is :\n%s\n", $callback)); $callback = eval $callback; $@ and usage; +if ($env) { + print STDERR N("using specific environment on %s\n", $env); + #- setting new environment. + $urpm->{config} = "$env/urpmi.cfg"; + $urpm->{skiplist} = "$env/skip.list"; + $urpm->{instlist} = "$env/inst.list"; + $urpm->{statedir} = $env; +} + $urpm->configure(nocheck_access => 1, noskipping => 1, media => $media, excludemedia => $excludemedia, @@ -521,6 +521,7 @@ $urpm->copy_packages_of_removable_media($list, \%sources, #- now create transaction just before installation, this will save user impression of slowness. $urpm->create_transaction($state, + nodeps => $urpm->{options}{'allow-nodeps'} || $urpm->{options}{'allow-force'}, split_level => $urpm->{options}{'split-level'}, split_length => $urpm->{options}{'split-length'}); @@ -2,7 +2,7 @@ Name: urpmi Version: 4.4 -Release: 3mdk +Release: 4mdk License: GPL Source0: %{name}.tar.bz2 Source1: %{name}.logrotate @@ -202,6 +202,11 @@ $urpm->update_media; %changelog +* Wed Jun 18 2003 François Pons <fpons@mandrakesoft.com> 4.4-4mdk +- added --env to urpmq and urpmf (simplest to examine now). +- fixed --allow-nodeps and --allow-force no more taken into + account (bug 4077). + * Wed Jun 18 2003 François Pons <fpons@mandrakesoft.com> 4.4-3mdk - changed --split-level behaviour to be a trigger (default 20). - added --split-length to give minimal transaction length (default 1). @@ -58,6 +58,8 @@ usage: to be 1080 by default (format is <proxyhost[:port]>). ") . N(" --proxy-user - specify user and password to use for proxy authentication (format is <user:password>). +") . N(" --env - use specific environment (typically a bug + report). ") . N(" -v - verbose mode. ") . N(" -d - extend query to package dependencies. ") . N(" -u - remove package if a more recent version is already installed. @@ -121,6 +123,7 @@ while (defined($_ = shift @ARGV)) { $urpm->{proxy}{pwd} = $2; next; }; + /^--env$/ and do { push @nextargv, \$query->{env}; next }; /^-(.*)$/ and do { foreach (split //, $1) { /[\?h]/ and do { usage; next }; /d/ and do { $query->{deps} = 1; next }; @@ -157,6 +160,15 @@ $query->{verbose} or $urpm->{log} = sub {}; #- improve speed if using any list_... options. $query->{nodepslist} = $query->{list_aliases} || $query->{list_nodes} || $query->{list_media}; +if ($query->{env}) { + print STDERR N("using specific environment on %s\n", $query->{env}); + #- setting new environment. + $urpm->{config} = "$query->{env}/urpmi.cfg"; + $urpm->{skiplist} = "$query->{env}/skip.list"; + $urpm->{instlist} = "$query->{env}/inst.list"; + $urpm->{statedir} = $query->{env}; +} + $urpm->configure(nocheck_access => 1, noskipping => $query->{nodepslist}, nodepslist => $query->{nodepslist}, media => $query->{media}, excludemedia => $query->{excludemedia}, @@ -285,6 +297,7 @@ if ($query->{list_aliases}) { } } elsif ($query->{auto_select} || $query->{upgrade}) { $urpm->resolve_dependencies($state, \%requested, + rpmdb => $query->{env} && "$query->{env}/rpmdb.cz", auto_select => $query->{auto_select}, callback_choices => $stop_on_choices); $query->{deps} or delete @{$state->{selected}}{grep { exists $state->{selected}{$_} && |