summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/C/urpmq.83
-rw-r--r--urpm.pm18
-rw-r--r--urpm/args.pm8
3 files changed, 27 insertions, 2 deletions
diff --git a/man/C/urpmq.8 b/man/C/urpmq.8
index ac2205ac..c6e7b957 100644
--- a/man/C/urpmq.8
+++ b/man/C/urpmq.8
@@ -90,6 +90,9 @@ Use specified HTTP proxy.
Use specified user and password to use for proxy authentication.
Specifying \fB\--proxy-user=ask\fP will cause urpmq to prompt for a username
and a password.
+.IP "\fB\--use-distrib\fP \fIdirectory\fP"
+Configure urpmq on the fly from a distrib tree. You must be root to use this
+option.
.IP "\fB\--env\fP \fIdirectory\fP"
Use a different environment directly from a bug report to replay a bug, the
argument is the same argument given to \fB--bug\fP option.
diff --git a/urpm.pm b/urpm.pm
index d64d62cb..8663b763 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -415,7 +415,23 @@ sub write_config {
delete $urpm->{modified};
}
-#- read urpmi.cfg file as well as synthesis file needed.
+#- read urpmi.cfg file as well as necessary synthesis files
+#- options :
+#- callback
+#- call_back_only_once
+#- excludemedia
+#- hdlist
+#- media
+#- nodepslist
+#- noinstalling
+#- noskipping
+#- parallel
+#- root
+#- searchmedia
+#- skip
+#- sortmedia
+#- update
+#- usedistrib
sub configure {
my ($urpm, %options) = @_;
diff --git a/urpm/args.pm b/urpm/args.pm
index b9e60087..6f632e4f 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -212,7 +212,13 @@ my %options_spec = (
force => \$options{force},
'skip=s' => \$options{skip},
'root=s' => sub { require File::Spec; $options{root} = File::Spec->rel2abs($_[1]) },
- 'use-distrib=s' => \$options{usedistrib},
+ 'use-distrib=s' => sub {
+ if ($< != 0) {
+ print STDERR N("You need to be root to use --use-distrib"), "\n";
+ exit 1;
+ }
+ $options{usedistrib} = $_[1];
+ },
'parallel=s' => \$options{parallel},
'env=s' => \$options{env},
'nolock' => \$options{nolock},