You are here: Foswiki>Tasks Web>Item13403 (17 Aug 2015, GeorgeClark)Edit Attach

Item13403: no copytree() method in debian package or tarball

pencil
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: minor
Applies To: Engine
Component: Configure
Branches:
Reported By: VMcIntyre
Waiting For:
Last Change By: GeorgeClark
-- VMcIntyre - 14 May 2015

I installed foswiki-1.1.9 from your debian repository.

When I run localhost/foswiki/bin/configure I am rewarded with this error message.

  Can't locate object method "copytree" via package "Foswiki::Configure::Checkers::WorkingDir" at /var/lib/foswiki/lib/Foswiki/Configure/Checkers/WorkingDir.pm line 78.

This is because there is no file that implements copytree().
  % grep -rci copytree /var/lib/foswiki |grep -v :0$
  /var/lib/foswiki/lib/Foswiki/Configure/Checkers/WorkingDir.pm:1

The same goes for the tarball which I downloaded from the link to sourceforge on your packages page. It's not provided by Perl's File::Util.

I got things unstuck again by getting the file from git
$ git clone https://github.com/foswiki/distro.git; cd distro
$ cp core/lib/Foswiki/Configure/FileUtil.pm /var/lib/foswiki/lib/Foswiki/Configure/FileUtil.pm
# vi var/lib/foswiki/lib/Foswiki/Configure/Checkers/WorkingDir.pm
The patch I made was;
--- /var/lib/foswiki/lib/Foswiki/Configure/Checkers/WorkingDir.pm.orig  2015-05-14 10:50:18.000000000 +1000
+++ /var/lib/foswiki/lib/Foswiki/Configure/Checkers/WorkingDir.pm       2015-05-14 10:49:05.000000000 +1000
@@ -5,6 +5,7 @@
 use warnings;
 
 use Foswiki::Configure::Checker ();
+use Foswiki::Configure::Checker::FileUtil ();
 our @ISA = ('Foswiki::Configure::Checker');
 
 sub untaint {

-- VMcIntyre - 14 May 2015

Wow, That's been broken since 1.1.0, it appears some cleanup early in 1.1 removed that routine from lib/Foswiki/Configure/Checker.pm. Your fix is good, as the code has been added back into the upcoming 1.2.0. So this can be marked as fixed in 1.2., once 1.2 is released.

-- GeorgeClark - 14 May 2015
 

ItemTemplate edit

Summary no copytree() method in debian package or tarball
ReportedBy VMcIntyre
Codebase 1.1.9
SVN Range
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Closed
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 2.0.0
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r3 - 17 Aug 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy