You are here: Foswiki>Tasks Web>Item12658 (19 Nov 2013, GeorgeClark)Edit Attach

Item12658: Configure: DEPENDENCIES on skins don't work as expected

Priority: Normal
Current State: Closed
Released In: 1.1.9
Target Release: patch
Applies To: Engine
Component: Configure
Branches: Release01x01 trunk
Reported By: JanKrueger
Waiting For:
Last Change By: GeorgeClark
If you want to add a dependency on a skin inside another extension, you'd expect it should look like this:

Foswiki::Contrib::MySkin,>=0,perl,I need my skin :(

This doesn't work, though. The dependency checker magically adds a Contrib suffix to the end of the extension name unless it already ends in Contrib or AddOn. So, the above dependency will make configure try to install MySkinContrib, which doesn't exist.

Current workaround: for adding dependencies on skins, put something like Foswiki::Plugins::MySkin (no suffixes are ever added for Foswiki::Plugins:: dependencies). The downside is that this way the dependency can never be fulfilled (after all, the skin's .pm file actually lives in the Foswiki::Contrib namespace), so the skin will be re-downloaded each time the dependent extension is reinstalled.

Minimal fix: add another exception for names that end in Skin.

Alternative fix: stop adding the Contrib suffix in the first place, assuming that dependencies are correct. Not a good idea in case someone is depending on this behaviour (even though they shouldn't).

I think this should be fixed in the upcoming release; marking it as such for now (feel free to reclassify). Thankfully the minimal fix is very simple. Just want to get a bit of feedback whether people agree that it should be changed (and which fix is the right choice) before I commit.

-- JanKrueger - 15 Nov 2013

Jan, I've tried the a minimal fix:
diff --git a/core/lib/Foswiki/Configure/ b/core/lib/Foswiki/Configure/
index a2f6840..23b442e 100644
--- a/core/lib/Foswiki/Configure/
+++ b/core/lib/Foswiki/Configure/
@@ -1480,7 +1480,7 @@ sub checkDependencies {
             my $pack     = $2;
             my $packname = $3;
             $packname .= $pack
-              if ( $pack eq 'Contrib' && $packname !~ /Contrib$|AddOn$/ );
+              if ( $pack eq 'Contrib' && $packname !~ /Contrib$|AddOn$|Skin$/ );
             $dep->{name} = $packname;
             push( @wiki, $dep )
               unless ( $dep->{description} =~ m/^[Oo]ptional/ );

Now that I've tested it a bit, this does seem perfectly acceptable. I'll get this into 1.1.9.

-- GeorgeClark - 18 Nov 2013

Tomorrow is Foswiki's 5th Birthday. Do you think we will be able to release 1.1.9 on the same occasion? wink

-- MichaelDaum - 18 Nov 2013

ItemTemplate edit

Summary Configure: DEPENDENCIES on skins don't work as expected
ReportedBy JanKrueger
Codebase 1.1.9 RC, 1.1.8, trunk
SVN Range
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Closed
Checkins distro:e66604bc88d9 distro:deebe827af12
TargetRelease patch
ReleasedIn 1.1.9
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:e66604bc88d9
Release01x01Checkins distro:deebe827af12
Topic revision: r8 - 19 Nov 2013, GeorgeClark - This page was cached on 20 Feb 2017 - 05:28.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License