• 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.

Note: For each new beta tarball I start with running UpgradeTwiki on my existing Cairo TWiki. This is the first of two workarounds I've applied before I got my first HTTP response from Dakar.

Running UpgradeTwiki from a freshly unzipped tarball doesn't work ('No such file or directory'):

  • UpgradeTwiki does a require 'setlib.cfg', after having added setlib.cfg='s directory to =@INC
  • setlib.cfg wants to determine $twikiLibPath from =Cwd::abs_path( "../lib" )"

Per default setlib.cfg assumes that it is running in the bin directory of a distribution. This is enforced by the CGI programs, but not by UpgradeTwiki.

I've been working around this with the following patch:

--- UpgradeTwiki.orig   2005-09-22 14:31:42.000000000 +0200
+++ UpgradeTwiki        2005-09-26 14:06:10.197766400 +0200
@@ -90,5 +90,11 @@
     unshift @INC, $newCfgFileDir;
     unshift @INC, $newCfgFileDir.'/../lib';    #TODO: make sure its not a relative path
-    require 'setlib.cfg';
+    {
+        use Cwd;
+        my $current = cwd();
+        chdir $newCfgFileDir;
+        require 'setlib.cfg';
+        chdir $current;
+    }
 
        eval 'use TWiki';

This needs to be fixed before the next beta. CC
I have applied your patch, (SVN:6635) and am playing with it as i work on other aspects of UpgradeTWiki

however, it worries me that I was able to run UpgradeTWiki successfully without it, while you could not.

Harald - could you post your command line please


Ok - here it is.

My Cairo installation (still active) is under /usr/haj/web/Twiki/ My Dakar tarball goes to /usr/haj/web/_Dakar/ Then, in /usr/haj/web/_Dakar/, I say

/usr/haj/web/_Dakar $ ./UpgradeTwiki /usr/haj/web/Twiki/bin/setlib.cfg /usr/haj/web/Dakar

Darn. This may once again be a OS issue. On Linux, Cwd::abs_path seems to be rather forgiving. All I could get was an "undef" (which wouldn't break UpgradeTwiki). My error report was from a cygwin installation. Cwd.pm shows a couple of suspicious calls to Carp::Croak in fast_abs_path which is aliased to abs_path on cygwin. I'll check with MSWin32+Activeperl and cygwinperl and report back.

-- TWiki:Main.HaraldJoerg


Confirmed: Under WindowsXP Pro, MSWin32+Activeperl 5.8.6 and cygwin perl 5.8.7 both croak if Cwd::abs_path is called on a nonexistent file. The following one-liner does not print 'Done' under these perls:

perl -MCwd -e "print Cwd::abs_path(q(../directorywhichdoesntexist));print q(Done)"

This could be considered a perl rather than TWiki issue. Nevertheless I'd suggest to make UpgradeTwiki robust enough to run on Windows derived systems....

-- TWiki:Main.HaraldJoerg

Where is the call to abs_path? I can't find any calls inthe TWiki codebase. Is it behind File::Spec->rel2abs? CC

bin/setlib.cfg, lines 29-32:

unless (( defined ($twikiLibPath) ) and (-e $twikiLibPath)) {
   use Cwd qw( abs_path );
   ( $twikiLibPath ) = ($twikiLibPath = Cwd::abs_path( "../lib" )) =~ /(.*)/;
}
-- TWiki:Main.HaraldJoerg
ok, as i've applied your patch, it should resolve lucking issues like this - thanks smile -- SD

ItemTemplate
Summary Dakar Beta - UpgradeTwiki: setlib.cfg assumes to run in $dist/bin
ReportedBy TWiki:Main.HaraldJoerg
AppliesTo Engine
Priority Urgent
CurrentState Closed
WaitingFor

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r9 - 2005-09-29 - SvenDowideit
 
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