summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-07 13:40:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-07 13:40:23 +0000
commit0977b27affca5e32b01cfab810f8ca5919691c0c (patch)
treefe6b5466fc289c6aecbd6a7aba3e2305f2e5494b /urpm/args.pm
parent1d542c9fe7709ae0a25b3289aa148734f75a4b1a (diff)
downloadurpmi-0977b27affca5e32b01cfab810f8ca5919691c0c.tar
urpmi-0977b27affca5e32b01cfab810f8ca5919691c0c.tar.gz
urpmi-0977b27affca5e32b01cfab810f8ca5919691c0c.tar.bz2
urpmi-0977b27affca5e32b01cfab810f8ca5919691c0c.tar.xz
urpmi-0977b27affca5e32b01cfab810f8ca5919691c0c.zip
create file2absolute_file() and use it
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 903ab2b2..54013793 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -8,6 +8,7 @@ no warnings 'once';
use Getopt::Long;# 2.33;
use urpm::download;
use urpm::msg;
+use urpm::util 'file2absolute_file';
use Exporter;
our @ISA = 'Exporter';
@@ -461,8 +462,9 @@ foreach my $k ("help|h", "version") {
sub set_root {
my ($urpm, $root) = @_;
- require File::Spec;
- $urpm->{root} = File::Spec->rel2abs($root);
+
+ $urpm->{root} = file2absolute_file($root);
+
if (!-d $urpm->{root}) {
$urpm->{fatal}->(9, N("chroot directory doesn't exist"));
}