summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-10-11 15:50:03 +0000
committerThierry Vignaud <tv@mageia.org>2012-10-11 15:50:03 +0000
commitce58451c60c85c9439d585f346881cfa0a41bc72 (patch)
tree0f41899359830812a8d32bea3dfe8d828a3ef8a8 /urpm/args.pm
parent06c03872c86abf7ec2a621f9f18e475598c10ab5 (diff)
downloadurpmi-ce58451c60c85c9439d585f346881cfa0a41bc72.tar
urpmi-ce58451c60c85c9439d585f346881cfa0a41bc72.tar.gz
urpmi-ce58451c60c85c9439d585f346881cfa0a41bc72.tar.bz2
urpmi-ce58451c60c85c9439d585f346881cfa0a41bc72.tar.xz
urpmi-ce58451c60c85c9439d585f346881cfa0a41bc72.zip
make --use-distrib works as user (mga#1225)
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 66766033..41201558 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -169,7 +169,12 @@ my %options_spec = (
'skip=s' => \$options{skip},
'prefer=s' => \$options{prefer},
'root=s' => sub { set_root($urpm, $_[1]) },
- 'use-distrib=s' => \$options{usedistrib},
+ 'use-distrib=s' => sub {
+ $options{usedistrib} = $_[1];
+ return if !$>;
+ $urpm->{cachedir} = $urpm->valid_cachedir;
+ $urpm->{statedir} = $urpm->valid_statedir;
+ },
'probe-synthesis' => sub { $options{probe_with} = 'synthesis' },
'probe-hdlist' => sub { $options{probe_with} = 'synthesis' }, #- ignored, kept for compatibility
'excludepath|exclude-path=s' => sub { $urpm->{options}{excludepath} = $_[1] },