summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm3
-rwxr-xr-xurpmf15
-rwxr-xr-xurpmi1
-rw-r--r--urpmi.spec7
-rwxr-xr-xurpmq13
5 files changed, 36 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index 9ed9bc69..7b8e3f2e 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -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 {
diff --git a/urpmf b/urpmf
index 30fcbb15..b3388f36 100755
--- a/urpmf
+++ b/urpmf
@@ -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,
diff --git a/urpmi b/urpmi
index adb2850e..034c7ed3 100755
--- a/urpmi
+++ b/urpmi
@@ -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'});
diff --git a/urpmi.spec b/urpmi.spec
index 76db8449..814b0c2b 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -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).
diff --git a/urpmq b/urpmq
index 7eb30817..a6236c44 100755
--- a/urpmq
+++ b/urpmq
@@ -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}{$_} &&