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

My directory structure is:

Dakar Beta 1 /usr/haj/web/Dakar current "work" TWiki
Dakar Beta 2 /usr/haj/web/_Dakar Beta 2, just unzipped, no changes

I say:

 /usr/haj/web/_Dakar/ $ perl -w UpgradeTwiki /usr/haj/web/Dakar/bin/setlib.cfg /usr/haj/web/Beta2_Dakar

However, none of the changes I made in /usr/haj/web/Dakar is carried over to /usr/haj/web/Beta2_Dakar.

I think I've found the reason in lib/TWiki/Upgrade/TWikiCfg.pm, around line 74: In this block, if a Dakar TWiki is detected, the files TWiki.cfg and LocalSite.cfg are executed. However, as a difference from "normal" TWiki online operation, this happens in the namespace TWiki::Upgrade::TWikiCfg and not in the namespace TWiki.

In the distribution the statements in both TWiki.cfg and LocalSite.cfg are given without a namespace:

# URL for TWiki host e.g. http://myhost.com:123
$cfg{DefaultUrlHost} = 'http://your.domain.com';

...hence the config files create and fill a new variable %TWiki::Upgrade::TWikiCfg::cfg instead of %TWiki::cfg. None of the old config directives is copied into the current configuration.

Workaround: Either manually add package TWiki; to your current TWiki.cfg and LocalSite.cfg or change all occurrences of $cfg{ to $TWiki::cfg{ in these files. I've noticed that bin/configure already does explicitly refer to the TWiki namespace.

Instead of that workaround I've applied a patch (attached) which explicitly creates a variable %TWiki::Upgrade::TWikiCfg::cfg before calling the config files and then merges this variable into %TWiki::cfg. The upgrade is still running but looks good smile

Duh - thanks Harald. Raised to "Requirement" CC
Aaarrrgh... Dakar->Dakar is holding another couple of gotchas in TWikiCfg.pm:
  • It says print NEW_CONFIG "\$twikiLibPath = '$targetDir/lib';"; I'd recommend print NEW_CONFIG "\$twikiLibPath = '$twikiLibPath';";, thus reflecting the current configuration. This is strongly suggested by step 9. in RemainingSteps which recommends to move $targetDir to the previous installation. The current behaviour is particularly nasty because one doesn't notice the bogus entry in normal web usage (setlib.cfg has a fallback to '../lib' if $twikiLibPath doesn't exist) but breaks if I do another Dakar->Dakar upgrade.
  • It says require 'TWiki.cfg'; which is a no-op because TWiki.pm already required it. Or should this be a do instead of require? I doubt so, because TWiki.cfg should be read from the "most recent" release.
  • The next statement says die "Cannot read TWiki.cfg: $@" if $@; which is also a no-op because the preceding one wasn't an eval.
  • It does do 'LocalSite.cfg'; (twice), but forgets to copy the local customisation to the target directory.

I'll provide an update for my patch - please have a close look. I'm still in the stage of TWiki discovery...

-- TWiki:Main.HaraldJoerg

nice work Harald - applied and in svn:6812 -- SD

Summary Dakar Beta 2: Dakar->Dakar upgrade - UpgradeTwiki doesn't pick up subwebs
ReportedBy TWiki:Main.HaraldJoerg
AppliesTo Engine
Priority Urgent
CurrentState Closed

Checkins 6812
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff TWikiCfg.pm.diff r2 r1 manage 1.4 K 2005-10-05 - 13:06 HaraldJoerg ...various gotchas with Dakar->Dakar
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2005-10-07 - SvenDowideit
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback