• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6028: build.pl fails in cleanup after building a plugin

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension BuildContrib Low New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

build.pl fails in cleanup. It appears to try to remove a /tmp directory that no longer exists.
(in cleanup) Can't call method "FETCH" on an undefined value at /usr/lib/perl5/5.8.8/File/Path.pm line 185 during global destruction.
at /var/www/SVN/twiki/core/lib/TWiki/Contrib/Build.pm line 66
TWiki::Contrib::Build::__ANON__('Can\'t call method "FETCH" on an undefined value at /usr/lib/...') called at /usr/lib/perl5/5.8.8/File/Path.pm line 185
File::Path::_rmtree('/tmp/1Fq7KuQNXi', '', '/var/www/SVN/twiki/ToolTipPlugin/lib/TWiki/Plugins/ToolTipPlugin', 773, 43794, 'undef', 0) called at /usr/lib/perl5/5.8.8/File/Path.pm line 304
File::Path::rmtree('/tmp/1Fq7KuQNXi') called at /var/www/SVN/twiki/core/lib/TWiki/Contrib/Build.pm line 314
TWiki::Contrib::Build::DESTROY('TWiki::Contrib::Build=HASH(0x8159c28)') called at build.pl line 0
eval {...} called at build.pl line 0

The fix appears to be to change Build.pm to test if the directory exists before removing it.

sub DESTROY {
     my $self = shift;
-    File::Path::rmtree( $self->{tmpDir} ) if $self->{tmpDir};
+    File::Path::rmtree( $self->{tmpDir} ) if $self->{tmpDir} && (-d "$self->{tmpDir}");
 }

-- TWiki:Main/GeorgeClark - 29 Sep 2008

ItemTemplate
Summary build.pl fails in cleanup after building a plugin
ReportedBy TWiki:Main.GeorgeClark
Codebase

SVN Range TWiki-5.0.0, Tue, 23 Sep 2008, build 17539
AppliesTo Extension
Component BuildContrib
Priority Low
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2008-09-29 - GeorgeClark
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback