Skip to content

CPAN.pm to work with tar (GNU tar) 1.12 in NT4sp4 #735

Closed

Description

@p5pRT

Migrated from rt.perl.org#1648 (status was 'resolved')

Searchable as RT1648$

Activity

  1. p5pRT commented on Oct 18, 1999

    @p5pRT
    Author

    From aichner@ecf.teradyne.com


    Hello Andy!

    tar (GNU tar) 1.12 as distributed for NT by Cygnus cannot handle DOS
    path names.

    Attached patch against
    Distribution ANDK/CPAN-1.50.tar.gz
    fixes the problem.

    If the patch is acceptable it would be nice to see it included in one
    of the next releases of CPAN.

    Thanks for the great module!

    BTW​: Do you require ChangeLog bits with patches?

    Regards,

    Adrian

    Inline Patch
    diff -u c:\perl\5.00503\lib\CPAN.pm.orig c:\perl\5.00503\lib\CPAN.pm
    --- c:\perl\5.00503\lib\CPAN.pm.orig	Tue Oct 19 03:32:42 1999
    +++ c:\perl\5.00503\lib\CPAN.pm	Tue Oct 19 03:32:42 1999
    @@ -4273,7 +4273,9 @@
     				  );
     	}
     	$file =~ s/\.gz$//;
    -	$system = "$CPAN::Config->{tar} xvf $file";
    +	chdir File::Basename::dirname($file);
    +	$system = "$CPAN::Config->{tar} xvf " 
    +	  . File::Basename::basename($file);
     	if (system($system)==0) {
     	    $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
     	} else {
    
    -----------------------------------------------------------------
    
    ---
    
    Site configuration information for perl 5.00503:

    Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration​:
      Platform​:
      osname=MSWin32, osvers=4.0, archname=MSWin32-x86
      uname=''
      hint=recommended, useposix=true, d_sigaction=undef
      usethreads=undef useperlio=undef d_sfio=undef
      Compiler​:
      cc='cl.exe', optimize='-Od -MD -DNDEBUG', gccversion=
      cppflags='-DWIN32'
      ccflags ='-Od -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT '
      stdchar='char', d_stdstdio=define, usevfork=false
      intsize=4, longsize=4, ptrsize=4, doublesize=8
      d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
      alignbytes=8, usemymalloc=y, prototype=define
      Linker and Libraries​:
      ld='link', ldflags ='-nologo -nodefaultlib -release -machine​:x86'
      libpth=\lib
      libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
      libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl.lib
      Dynamic Linking​:
      dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
      cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -machine​:x86'

    Locally applied patches​:
     


    @​INC for perl 5.00503​:
      d​:\Users\AichnerAd\pl
      c​:\perl\5.00503\lib/MSWin32-x86
      c​:\perl\5.00503\lib
      c​:\perl\site\5.00503\lib/MSWin32-x86
      c​:\perl\site\5.00503\lib
      .


    Environment for perl 5.00503​:
      HOME=d​:\Users\AichnerAd
      LANG (unset)
      LANGUAGE (unset)
      LD_LIBRARY_PATH (unset)
      LOGDIR (unset)
      PATH=c​:\perl\5.00503\bin;c​:\perl\5.00503\bin\MSWin32-x86;c​:\cygnus\cygwin-b20\H-i586-cygwin32\bin;c​:\mks\mkssi;c​:\mks\mksnt;c​:\gcisdn;C​:\WINNT\system32;C​:\WINNT;C​:\NTRESKIT;c​:\mks\mkssi;c​:\cvs;c​:\enscript;c​:\gnuserv-2_1p1\gnuserv;C​:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C​:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C​:\Program Files\Microsoft Visual Studio\Common\Tools;C​:\Program Files\Microsoft Visual Studio\VC98\bin
      PERL5LIB=d​:\Users\AichnerAd\pl
      PERL_BADLANG (unset)
      SHELL (unset)

  2. p5pRT commented on Oct 19, 1999

    @p5pRT
    Author

    From @andk

    On 19 Oct 1999 05​:20​:53 +0200, Adrian Aichner <aichner@​ecf.teradyne.com> said​:

    diff -u c​:\perl\5.00503\lib\CPAN.pm.orig c​:\perl\5.00503\lib\CPAN.pm
    --- c​:\perl\5.00503\lib\CPAN.pm.orig Tue Oct 19 03​:32​:42 1999
    +++ c​:\perl\5.00503\lib\CPAN.pm Tue Oct 19 03​:32​:42 1999
    @​@​ -4273,7 +4273,9 @​@​
    );
    }
    $file =~ s/\.gz$//;
    - $system = "$CPAN​::Config->{tar} xvf $file";
    + chdir File​::Basename​::dirname($file);
    + $system = "$CPAN​::Config->{tar} xvf "
    + . File​::Basename​::basename($file);
    if (system($system)==0) {
    $CPAN​::Frontend->myprint(qq{Untarred $file successfully\n});
    } else {

    Thanks for the patch.

    Is there no chdir back needed?

    --
    andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions