Skip Menu |
 

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 26122
Status: resolved
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: m.nooning [...] comcast.net
Cc:
AdminCc:

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



Subject: Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Download (untitled) / with headers
text/plain 526b
I am getting the same failure results as reported at http://www.nntp.perl.org/group/perl.cpan.testers/2007/01/msg394175.html by by Steffen Mueller, only he is using Strawberry and I am using ActiveState, perl 5.8.8, Windows XP, MinGW, with Module::Install at 0.65 (in case it matters). Namely, during the "nmake test" phase, I get this: t/p_tainted.....FAILED before any test output arrived The module Catalyst, with all of it's web building modules, depends upon Scalar-List-Utils, so I need this resovled first. Thanks
From: m.nooning [...] comcast.net
Download (untitled) / with headers
text/plain 793b
Hmphf! I have two bugs with Scalar::List::Utils, and I got their titles mixed up. Okay, here is the bug that goes with the title. Again, the module Catalyst, with all of many, many web building modules, depends upon Scalar-List-Utils, so I need this resovled first. --------paste error message Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll: Permission denied at C:/Perl/lib/File/Find.pm line 918 Skipping C:\Perl\lib\auto\List\Util\Util.bs (unchanged) NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xd' Stop. ---------end paste There is an extensive discussion of the problem at http://www.nntp.perl.org/group/perl.qa/2006/02/msg5415.html At least nine participants in the forum wrote in giving alternating views, but did not seem to reveal a fix. Thanks
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 6 Apr 2007 07:18:49 -0500
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 719b
On Apr 5, 2007, at 4:16 PM, Malcolm Nooning via RT wrote: Show quoted text
> Again, the module Catalyst, with all of many, many web building > modules, > depends upon Scalar-List-Utils, so I need this resovled first. > > --------paste error message > Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll: Permission > denied at C:/Perl/lib/File/Find.pm line 918 > Skipping C:\Perl\lib\auto\List\Util\Util.bs (unchanged) > NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xd' > Stop.
I do not know much about windows, but I suspect that the script you are running uses List::Util, which means the program has the dll opened and so the OS is disallowing you to remove it. This is not a bug in List::Util. Graham.
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 6 Apr 2007 07:16:11 -0500
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 621b
On Apr 5, 2007, at 4:07 PM, Malcolm Nooning via RT wrote: Show quoted text
> I am getting the same failure results as reported at > > http://www.nntp.perl.org/group/perl.cpan.testers/2007/01/ > msg394175.html > by by Steffen Mueller, only he is using Strawberry and I am using > ActiveState, perl 5.8.8, Windows XP, MinGW, with Module::Install at > 0.65 > (in case it matters). > > Namely, during the "nmake test" phase, I get this: > t/p_tainted.....FAILED before any test output arrived
I do not see this error on platforms I have access to. What happens if you try to run this manually perl -T -Mblib t/p_tainted.t Graham.
From: m.nooning [...] comcast.net
Download (untitled) / with headers
text/plain 785b
I believe you are correct. This bug can be closed/rejected. I was using a downloaded script called cat-install.pl that is meant to install the Catalyst system. When I installed the remaining modules and dependencies by hand it all went through cleanly. For the benefit of anyone else who may read this bug report and is trying to install Catalyst, I would still go to http://www.shadowcatsystems.co.uk/static/cat-install and get cat-install.pl, and then run it so that it will install the things it will, and also to view the dependency failures, which gives you a list of the things to be done by hand. The script does not itself use List::Util, but, again, Scalar-List-Utils installs by hand. The script invokes ppm so maybe ppm itself is somewhere using List::Util. Thanks
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 06 Apr 2007 08:51:51 -0400
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Malcolm Nooning <m.nooning [...] comcast.net>
Download (untitled) / with headers
text/plain 214b
Oops, I forgot about the second bug reported in this thread. Please do not yet close it out. Show quoted text
>perl -T -Mblib t/p_tainted.t
Insecure dependency in require while running with -T switch at t/p_tainted.t line 10.
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 6 Apr 2007 08:19:04 -0500
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 492b
On Apr 6, 2007, at 7:51 AM, Malcolm Nooning via RT wrote: Show quoted text
> Oops, I forgot about the second bug reported in this thread. > Please do > not yet close it out. >
>> perl -T -Mblib t/p_tainted.t
> Insecure dependency in require while running with -T switch at > t/p_tainted.t line 10.
That is probably coming from -Mblib, try both of these (or whatever the equivalent would be on windows) perl -Iblib/lib -Iblib/arch -T t/p_tainted.t perl -Iblib/lib -Iblib/arch -T t/tainted.t Graham.
From: m.nooning [...] comcast.net
Download (untitled) / with headers
text/plain 392b
I noticed that between version 1.18 and 1.19, you changed p_tainted.t from do "./$filename"; to do $filename; I changed it back to "./$filename" and now all tests pass. You use File::Spec to get the fully qualified path name for $filename so I do not know why the ./ is should be needed. I hate it when I know how to fix something but have no clue as to why it is a fix. Any ideas?
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 06 Apr 2007 09:43:47 -0400
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Malcolm Nooning <m.nooning [...] comcast.net>
Download (untitled) / with headers
text/plain 975b
------------paste with do "./$filename"; Show quoted text
>perl -Iblib/lib -Iblib/arch -T t/p_tainted.t
1..4 ok 1 - constant number ok 2 - known variable ok 3 - environment variable ok 4 - copy of environment variable Show quoted text
>perl -Iblib/lib -Iblib/arch -T t/tainted.t
1..4 ok 1 - constant number ok 2 - known variable ok 3 - environment variable ok 4 - copy of environment variable Show quoted text
>prove t\p_tainted.t
t\p_tainted....ok All tests successful. Files=1, Tests=4, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) ------------End paste with do "./$filename"; ------------paste with do $filename; Show quoted text
>perl -Iblib/lib -Iblib/arch -T t/p_tainted.t
Show quoted text
>perl -Iblib/lib -Iblib/arch -T t/tainted.t
1..4 ok 1 - constant number ok 2 - known variable ok 3 - environment variable ok 4 - copy of environment variable Show quoted text
>prove t\p_tainted.t
t\p_tainted....FAILED before any test output arrived FAILED--1 test script could be run, alas--no output ever seen ------------paste with do $filename; Show quoted text
>
Subject: Re: [rt.cpan.org #26122] Cannot forceunlink C:\Perl\lib\auto\List\Util\Util.dll
Date: Fri, 6 Apr 2007 09:36:28 -0500
To: bug-Scalar-List-Utils [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Download (untitled) / with headers
text/plain 892b
On Apr 6, 2007, at 8:19 AM, Malcolm Nooning via RT wrote: Show quoted text
> I noticed that between version 1.18 and 1.19, you changed > p_tainted.t from > > do "./$filename"; > to > do $filename; > > I changed it back to "./$filename" and now all tests pass.
That is odd. Show quoted text
> You use File::Spec to get the fully qualified path name for > $filename so > I do not know why the ./ is should be needed.
the change to remove ./ and use File::Spec was because ./ does not work on VMS Show quoted text
> I hate it when I know how to fix something but have no clue as to > why it > is a fix. Any ideas?
None at all. Maybe windows is treating an unqualified path as tainted. Strange that it would differ between OSes though What is in $filename after calling File::Spec ? And what was in $f before calling File::Spec We could add $filename = "./$filename" if $^O eq 'Win32' But I really do not like that. Graham.
From: m.nooning [...] comcast.net
Download (untitled) / with headers
text/plain 1.3k
There does not seem to be a difference in $filename. ------------------------paste modified p_tainted.t #!./perl -T use File::Spec; # force perl-only version to be tested $List::Util::TESTING_PERL_ONLY = $List::Util::TESTING_PERL_ONLY = 1; (my $f = __FILE__) =~ s/p_//; open (FH, ">f.txt") or die ("No f.txt\n"); print FH ("This is f: :$f:\n"); close FH or die ("Ouch 1\n"); my $filename = File::Spec->catfile(".", $f); $filename =~ s/\n//g; open (FH, ">filename.txt") or die ("No filename.txt\n"); print FH ("This is filename: :$filename:\n"); close FH or die ("Ouch 2\n"); do $filename; -----------------------End paste modified p_tainted.t ----------------------Paste results Show quoted text
>prove t\p_tainted.t
t\p_tainted....FAILED before any test output arrived FAILED--1 test script could be run, alas--no output ever seen Show quoted text
>type f.txt
This is f: :t\tainted.t: Show quoted text
>type filename.txt
This is filename: :.\t\tainted.t: ----------------------End Paste results ######### *********** HERE I CHANGED TO do "./$filename" ********* ######### ---------------------Paste results Show quoted text
>prove t\p_tainted.t
t\p_tainted....ok All tests successful. Files=1, Tests=4, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Show quoted text
>type f.txt
This is f: :t\tainted.t: Show quoted text
>type filename.txt
This is filename: :.\t\tainted.t: ----------------------End Paste results
From: m.nooning [...] comcast.net
Download (untitled) / with headers
text/plain 2.3k
There is at least one more work-around for the forceunlink problem. Namely, simply "del C:\perl\lib\auto\List\Util\Util.dll" and then nmake install. Simply doing "attrib -R C:\perl\lib\auto\List\Util\Util.dll" does not help. What is also baffling is that once I delete Util.dll and run nmake install, which then succeeds, I can then keep on succeeding at running nmake install over and over. The attrib is +R on Util.dll. I have no explanation for this. The only hint is, if I do "nmake clean" and restart, then it will fail to install again as before, forcing me to del Util.dll to get the nmake install to work. Again, no explanations. Going back to the do $filename failure. It never fails now. I deleted the entire directory tree, redownloaded a fresh copy of the .gz file, unzipped and untarred it, etcetera. It still passes. Work-around or not, I am baffled as for a definitive answers. The original failure reports noted earlier will prevent ActiveState from making a ppm out of this 1.19 version, as I think they have a policy of making a ppm only if all tests pass. If there is anything anyone can suggest trying I would be quite willing to make the attempt. Otherwise I am going to let it drop. By the way, the script below works just fine. I wonder where the "forceunlink" message is coming from? I wonder also, is our script changing the attrib with -R prior to the attempted unlink?; and then resetting it with +R? chmod does not work of course on Windows but I do not see any "cannot chmod" warnings like I do on a lot of other modules. Is there a place in one of the scripts wherein I can place a "attrib -R ..." statement and then see if it works? Maybe MakeMaker already takes care of such things, I don't know. --------------paste works just fine #!/usr/bin/perl -w use strict; my $file = "C:\\perl\\lib\\auto\\List\\Util\\Util.dll"; my $temp = $file . "_temp"; if (system ("copy", "$file", "$temp")) { print ("Cannot copy $file $temp\n"); } if (system ("attrib", "-R", "$file")) { print ("Cannot change attributes on $file\n"); } if (!(unlink("$file"))) { print ("Cannot unlink $file\n"); } if (system ("copy", "$temp", "$file" )) { print ("Cannot copy $temp $file\n"); } if (system ("attrib", "+R", "$file")) { print ("Cannot change attributes on $file\n"); } ------------------End works just fine Thanks


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.