summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-06-18 16:58:28 +0000
committerFrancois Pons <fpons@mandriva.com>2003-06-18 16:58:28 +0000
commitc1d62ecbeb089ba0216b247a943c7ed16601198d (patch)
treef9cc782d19594764ed2e33f1bfc36f51ea89379c /urpmq
parent64af856707aa58dc4cbafb12bcecd75e4a71ed65 (diff)
downloadurpmi-c1d62ecbeb089ba0216b247a943c7ed16601198d.tar
urpmi-c1d62ecbeb089ba0216b247a943c7ed16601198d.tar.gz
urpmi-c1d62ecbeb089ba0216b247a943c7ed16601198d.tar.bz2
urpmi-c1d62ecbeb089ba0216b247a943c7ed16601198d.tar.xz
urpmi-c1d62ecbeb089ba0216b247a943c7ed16601198d.zip
4.4-4mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq13
1 files changed, 13 insertions, 0 deletions
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}{$_} &&