From 43d6b89e89573594f2db899b9c5e4005578f726e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 14 Jun 2007 16:04:16 +0000 Subject: - urpmq o allow using --use-distrib as non-root nb: reverting commit r15208 2005-10-12 "Forbid urpmq --use-distrib when non root" since i can't see any valid reason for this --- pod/urpmq.8.pod | 3 +-- urpm/args.pm | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/pod/urpmq.8.pod b/pod/urpmq.8.pod index 922b0e34..c1904f07 100644 --- a/pod/urpmq.8.pod +++ b/pod/urpmq.8.pod @@ -171,8 +171,7 @@ and a password. =item B<--use-distrib> I -Configure urpmq on the fly from a distribution tree. You must be root to use -this option. +Configure urpmq on the fly from a distribution tree. =item B<--probe-synthesis> diff --git a/urpm/args.pm b/urpm/args.pm index 62786b7a..831facd3 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -238,13 +238,6 @@ my %options_spec = ( sources => \$options{sources}, force => \$options{force}, 'skip=s' => \$options{skip}, - '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}, d => \$options{deps}, @@ -368,7 +361,7 @@ foreach my $k ("help|h", "version", "no-locales", "test!", "force", "root=s", "u { $options_spec{urpme}{$k} = $options_spec{urpmi}{$k}; } -foreach my $k ("root=s", "nolock") +foreach my $k ("root=s", "nolock", "use-distrib=s") { $options_spec{urpmq}{$k} = $options_spec{urpmi}{$k}; } -- cgit v1.2.1