pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/30052: wml File::Spec used incorrect



>Number:         30052
>Category:       pkg
>Synopsis:       Incorrect usage of File::Spec in wml
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 24 19:57:01 +0000 2005
>Originator:     Christian Gall
>Release:        pkgsrc-2005Q1, also in currecnt
>Organization:
        
>Environment:
System: NetBSD hades.cgall.de 3.0_BETA NetBSD 3.0_BETA (HADES) #2: Fri Apr 8 
23:39:53 CEST 2005 
root%hades.cgall.de@localhost:/usr/obj/sys/arch/i386/compile/HADES i386
Architecture: i386
Machine: i386
>Description:
        abs2rel() is called File::Spec::abs2rel(), but should be 
File::Spec->abs2rel
        (for newer versions of File::Spec)
>How-To-Repeat:
        Try to execute wml...
>Fix:
        Here's a modified patch-ab, which should fix the problem:
        

$NetBSD$

--- wml_frontend/wml.src.orig   2002-04-21 01:04:28.000000000 +0200
+++ wml_frontend/wml.src
@@ -49,7 +49,7 @@ if ($ENV{'PATH'} !~ m|@bindir@|) {
 }
 
 use Getopt::Long 2.13;
-use File::PathConvert;
+use File::Spec 0.87;
 use IO::File 1.06;
 use Term::ReadKey;
 use Cwd;
@@ -338,7 +338,7 @@ if (not $opt_r) {
             @opt_I_NEW = @opt_I_OLD;
 
             #   adjust -D options
-            $reldir = File::PathConvert::abs2rel("$dir", "$src");
+            $reldir = File::Spec->abs2rel("$dir", "$src");
             $reldir = "." if $reldir eq '';
             foreach $d (@opt_D) {
                 if ($d =~ m|^([A-Za-z0-9_]+)~(.+)$|) {
@@ -363,7 +363,7 @@ if (not $opt_r) {
             }
 
             #   adjust -I options
-            $reldir = File::PathConvert::abs2rel("$dir");
+            $reldir = File::Spec->abs2rel("$dir");
             $reldir = "." if $reldir eq '';
             foreach $path (@opt_I) {
                 if ($path !~ m|^/|) {
@@ -477,7 +477,7 @@ if (not $src_istmp) {
     $reldir = $src;
     $reldir =~ s,(:?/|^)[^/]+$,,;
     ($cwd = Cwd::cwd) =~ s|/$||;
-    $reldir = File::PathConvert::abs2rel($cwd, "$cwd/$reldir");
+    $reldir = File::Spec->abs2rel($cwd, "$cwd/$reldir");
     $reldir = "." if $reldir eq '';
 }
 else {
@@ -958,7 +958,7 @@ else {
     if ($src =~ m|/|) {
         $src_dirname = $src;
         $src_dirname =~ s|/+[^/]*$||;
-        $src_dirname = File::PathConvert::realpath("$src_dirname");
+        $src_dirname = File::Spec->canonpath("$src_dirname");
     }
     else {
         $src_dirname  = $cwd;




Home | Main Index | Thread Index | Old Index