Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
p5pRT opened this issue Oct 18, 1999 · 2 comments
Closed

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

p5pRT opened this issue Oct 18, 1999 · 2 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Oct 18, 1999

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

Searchable as RT1648$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 18, 1999

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)

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Oct 19, 1999

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant