From d9795bc46269e65a04938137f68937c04a52f1ae Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Thu, 23 Apr 2015 21:32:20 -0400 Subject: [PATCH] dep-resolv: Support logical-module-group revised wildcard syntax. Instead of requiring wildcards to immediately follow a '/' character in branch-group handling (or to be a bare '*'), allow for wildcards following other characters since it seems CI supports that syntax. This should fix branch selection for the KDE Telepathy modules. --- modules/ksb/Module/BranchGroupResolver.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ksb/Module/BranchGroupResolver.pm b/modules/ksb/Module/BranchGroupResolver.pm index a2f90fb..ceae807 100644 --- a/modules/ksb/Module/BranchGroupResolver.pm +++ b/modules/ksb/Module/BranchGroupResolver.pm @@ -33,12 +33,11 @@ sub new # Extract wildcarded groups separately as they are handled separately # later. Note that the specific catch-all group '*' is itself handled - # as a special case in findModuleBranch. This is important so that - # findModuleBranch can assume all these groups have at least '/*'. + # as a special case in findModuleBranch. $self->{wildcardedGroups} = { map { ($_, $self->{groups}->{$_}) } - grep { substr($_,-2) eq '/*' } + grep { substr($_,-1) eq '*' } keys %{$self->{groups}} }; @@ -68,7 +67,7 @@ sub findModuleBranch my %catchAllGroupStats = map { # Map module search spec to prefix string that is required for a match - $_ => substr($_, 0, rindex ($_, '/') + 1) + $_ => substr($_, 0, -1) } keys %{$self->{wildcardedGroups}}; # Sort longest required-prefix to the top... first match that is valid will