Skip Menu |
 

This queue is for tickets about the PAR-Repository CPAN distribution.

Report information
The Basics
Id: 23527
Status: rejected
Priority: 0/
Queue: PAR-Repository

People
Owner: Nobody in particular
Requestors: stro [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: MSWin32 compatibility with Win32::Symlink
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1164133198-18467-3"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 607
Download (untitled) / with headers
text/plain 607b
Despite the fact that Perl built under native Win32 environment (like ActivePerl) doesn't have symlink support, this support is provided by NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can be used as workaround on NTFS filesystem. Attached patch adds Win32::Symlink usage for PAR::Repository when it runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to avoid using under Cygwin environment, where 'gcc' is used). Sadly I found no functionality tests included in distributive, so I cannot be sure about absolutely correct work, but it should. -- Serguei Trouchelle
Subject: PAR-Repository-1.14-Win32.patch
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1164133198-18467-2"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="PAR-Repository-1.14-Win32.patch"
Content-Disposition: inline; filename="PAR-Repository-1.14-Win32.patch"
Content-Transfer-Encoding: base64
Content-Length: 1469
--- S:\prj\CPAN\builds\PAR-Repository-0.14\Makefile.PL Sun Oct 29 14:35:06 2006 +++ S:\prj\CPAN\builds\PAR-Repository-0.14-W32\Makefile.PL Tue Nov 21 19:54:24 2006 @@ -3,6 +3,21 @@ # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. +use Config; + +my @addprereq; + +if ($^O eq 'MSWin32' and $Config{'cc'} eq 'cl') { # Cygwin's gcc should work fine + eval { require Win32::Symlink; }; + if ($@) { + warn "Using this module under native MSWin32 environment requires\nWin32::Symlink module.\n\n"; + } else { + use Win32::Symlink; + } + @addprereq = 'Win32::Symlink' => '0.04'; +} + + if (not $ENV{IGNORE_SYMLINK_WARNINGS} and not eval {symlink("", ""); 1;}) { warn <<'HERE'; Your system does not support creation of symbolic links. @@ -35,6 +50,7 @@ 'Pod::Text' => '0', 'ExtUtils::Manifest' => '0', 'PAR::Repository::Query' => '0.12', + @addprereq, }, # e.g., Module::Name => 1.1 EXE_FILES => [ 'bin/parrepo', --- S:\prj\CPAN\builds\PAR-Repository-0.14\lib\PAR\Repository.pm Sat Nov 04 23:47:41 2006 +++ S:\prj\CPAN\builds\PAR-Repository-0.14-W32\lib\PAR\Repository.pm Tue Nov 21 20:05:26 2006 @@ -14,6 +14,11 @@ use Archive::Zip qw//; use File::Temp qw//; use version qw//; +use Config; + +if ($^O eq 'MSWin32' and $Config{'cc'} eq 'cl') { + use Win32::Symlink; +} use base qw/ PAR::Repository::Zip
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.6.HEAD-18467-1164133200-1811.23527-4-0 [...] rt.cpan.org>
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-23527 [...] rt.cpan.org> <rt-3.6.HEAD-18467-1164133200-1811.23527-4-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id AAF244D8013 for <bug-PAR-Repository [...] rt.cpan.org>; Tue, 21 Nov 2006 14:35:02 -0500 (EST)
Received: (qmail 11850 invoked by alias); 21 Nov 2006 19:35:01 -0000
Received: from sd-green-bigip-83.dreamhost.com (HELO spunkymail-a6.dreamhost.com) (208.97.132.83) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 21 Nov 2006 11:34:55 -0800
Received: from [10.59.0.18] (i3ED6FFE5.versanet.de [62.214.255.229]) by spunkymail-a6.dreamhost.com (Postfix) with ESMTP id DAEFF109F2F for <bug-PAR-Repository [...] rt.cpan.org>; Tue, 21 Nov 2006 11:34:08 -0800 (PST)
Delivered-To: cpan-bug+par-repository [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #23527] MSWin32 compatibility with Win32::Symlink
User-Agent: Thunderbird 1.5.0.8 (X11/20061115)
Return-Path: <rt8363b02 [...] sneakemail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-PAR-Repository [...] rt.cpan.org
Date: Tue, 21 Nov 2006 20:34:49 +0100
Message-Id: <456354D9.9010508 [...] sneakemail.com>
To: bug-PAR-Repository [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Steffen Mueller <rt8363b02 [...] sneakemail.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-18469-1164137708-441.23527-0-0 [...] rt.cpan.org>
Content-Length: 890
Download (untitled) / with headers
text/plain 890b
Hi, Serguei Trouchelle via RT schrieb: Show quoted text
> Despite the fact that Perl built under native Win32 environment (like > ActivePerl) doesn't have symlink support, this support is provided by > NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can > be used as workaround on NTFS filesystem. > > Attached patch adds Win32::Symlink usage for PAR::Repository when it > runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to > avoid using under Cygwin environment, where 'gcc' is used).
I didn't know about Win32::Symlink. I'll look at it! (And of course, at your patch!) Show quoted text
> Sadly I found no functionality tests included in distributive, so I > cannot be sure about absolutely correct work, but it should.
Well, yes. It's a shame I never wrote extensive tests. Sorry. :( I'll address this asap, but that might mean it has to wait until about Christmas. Steffen
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-22565-1164637786-1080.23527-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 918
Download (untitled) / with headers
text/plain 918b
On Tue Nov 21 13:19:59 2006, STRO wrote: Show quoted text
> Despite the fact that Perl built under native Win32 environment (like > ActivePerl) doesn't have symlink support, this support is provided by > NT-based operation systems (like Win2k/XP/2003), and Win32::Symlink can > be used as workaround on NTFS filesystem. > > Attached patch adds Win32::Symlink usage for PAR::Repository when it > runs on $^O eq 'MSWin32' and has 'cl' as C Compiler in Config.pm (to > avoid using under Cygwin environment, where 'gcc' is used). > > Sadly I found no functionality tests included in distributive, so I > cannot be sure about absolutely correct work, but it should.
Hi again, unfortunately, Win32::Symlink works only for directories. Hence it is not suitable for PAR::Repository. Your idea was good, but it's not going to work. Audrey's Win32::Symlink needs to mention that in the docs :/ I'm marking the ticket as rejected. Steffen


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.