From 3267c3f4be80d707e49287c4181f14d17f0e047d Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 2 Oct 2009 21:54:23 +0530 Subject: [PATCH] compile: change %groups from hash of lists to hash of hashes This makes it easier to test if a repo is a member of a group, which is required for the delegation feature coming up --- src/gl-compile-conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gl-compile-conf b/src/gl-compile-conf index 9b13dd7..e257c69 100755 --- a/src/gl-compile-conf +++ b/src/gl-compile-conf @@ -104,7 +104,7 @@ sub expand_list { die "$ATTN undefined group $item\n" unless $groups{$item}; # add those names to the list - push @new_list, @{ $groups{$item} }; + push @new_list, sort keys %{ $groups{$item} }; } else { @@ -139,7 +139,7 @@ while (<$conf_fh>) # user or repo groups if (/^(@\S+) = (.*)/) { - push @{ $groups{$1} }, expand_list( split(' ', $2) ); + do { $groups{$1}{$_} = 1 } for ( expand_list( split(' ', $2) ) ); # again, we take the more "relaxed" pattern die "$ATTN bad group $1\n" unless $1 =~ $REPONAME_PATT; }