You are here: Foswiki>Tasks Web>Item14543 (27 Nov 2017, WillLe)Edit Attach

Item14543: Why doesn't pseudo-install.pl use relative symlink instead of absolute symlink?

pencil
Priority: Normal
Current State: Duplicate
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: PseudoInstall
Branches:
Reported By: WillLe
Waiting For:
Last Change By: WillLe
For portability, I think symlink to relative path target is better than to absolute path target. I see in pseudo-install.pl that the relative paths are calculated first, and then converted to absolute paths. So, I think there must be some rationale behind the absolute symlink, that I've not understood yet.

To my mind, because the structure of Foswiki's dirs (core & extensions) is well established (like the diagram below), using relative symlinks is much better (for portability) than absolute ones.

The structure Foswiki's repos & dirs, as explained in GitRepository#Repositories:
foswiki
├── distro
│   ├── core
│   ├── BuildContrib
│   ⋮   (other default extensions)
├── NatSkin
⋮   (other non-default extensions)

I'm attempting to modify the pseudo-install.pl script to use relative symlinks, but at first I must discuss about this situation for better understanding the motivation of absolute symlinking.

-- WillLe - 26 Nov 2017

Unfortunately a lot of this code is very old, and has evolved over time. Why questions are often almost impossible to answer.

The best solution is to look at either git blame, or git log -L to examine the history of a routine or range of lines, to get an idea of when/who changed it. One reason that pseudo-install doesn't get much attention is that it's almost never used by production / critical sites. We really expect most foswiki installations to run from the tar/zip files that we build during the release process. pseudo-install.pl is left as the shoemakers children, needing patching, but without much enthusiasm for changes.

A quick check of PseudoInstall, shows that someone else already wants this - Item11292

-- GeorgeClark - 26 Nov 2017

There is actually some suggested code in Item10873

-- GeorgeClark - 26 Nov 2017

One reason that pseudo-install doesn't get much attention is that it's almost never used by production / critical sites. 
I don't think portability is exclusive to production sites. In our dev environment, we usually have to swap wikis in & out and move them around, so an option for relative symlinks is a need for us. Anyway, I will dig into it later when I have spare time.

-- WillLe - 27 Nov 2017
 

ItemTemplate edit

Summary Why doesn't pseudo-install.pl use relative symlink instead of absolute symlink?
ReportedBy WillLe
Codebase 2.1.4, trunk
SVN Range
AppliesTo Engine
Component PseudoInstall
Priority Normal
CurrentState Duplicate
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r3 - 27 Nov 2017, WillLe
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