(big-config) compile: create new repos even if GL_BIG_CONFIG is set
...by expanding the groups of course
This commit is contained in:
parent
cf0e568c89
commit
c8f83a03dd
|
@ -405,27 +405,37 @@ die "\n\t\t***** AAARGH! *****\n" .
|
||||||
# so if it was not already absolute, prefix $HOME.
|
# so if it was not already absolute, prefix $HOME.
|
||||||
my $repo_base_abs = ( $REPO_BASE =~ m(^/) ? $REPO_BASE : "$ENV{HOME}/$REPO_BASE" );
|
my $repo_base_abs = ( $REPO_BASE =~ m(^/) ? $REPO_BASE : "$ENV{HOME}/$REPO_BASE" );
|
||||||
|
|
||||||
wrap_chdir("$repo_base_abs");
|
{
|
||||||
|
wrap_chdir("$repo_base_abs");
|
||||||
|
|
||||||
for my $repo (sort keys %repos) {
|
# autocreate repos. Start with the ones that are normal repos in %repos
|
||||||
next unless $repo =~ $REPONAME_PATT;
|
my @repos = grep { $_ =~ $REPONAME_PATT and not /^@/ } sort keys %repos;
|
||||||
next if $repo =~ m(^\@|EXTCMD/); # these are not real repos
|
# then, for each repogroup, find the members of the group and add them in
|
||||||
unless (-d "$repo.git") {
|
map { push @repos, keys %{ $groups{$_} } } grep { /^@/ } keys %repos;
|
||||||
print STDERR "creating $repo...\n";
|
# weed out duplicates (the code in the loop below is disk activity!)
|
||||||
new_repo($repo, "$GL_ADMINDIR/hooks/common");
|
my %seen = map { $_ => 1 } @repos;
|
||||||
# new_repo would have chdir'd us away; come back
|
@repos = sort keys %seen;
|
||||||
wrap_chdir("$repo_base_abs");
|
|
||||||
}
|
|
||||||
|
|
||||||
# when repos are copied over from elsewhere, one had to run easy install
|
for my $repo (sort @repos) {
|
||||||
# once again to make the new (OS-copied) repo contain the proper update
|
next unless $repo =~ $REPONAME_PATT;
|
||||||
# hook. Perhaps we can make this easier now, and eliminate the easy
|
next if $repo =~ m(^\@|EXTCMD/); # these are not real repos
|
||||||
# install, with a quick check (and a new, empty, "hook" as a sentinel)
|
unless (-d "$repo.git") {
|
||||||
unless (-l "$repo.git/hooks/gitolite-hooked") {
|
print STDERR "creating $repo...\n";
|
||||||
ln_sf("$GL_ADMINDIR/hooks/common", "*", "$repo.git/hooks");
|
new_repo($repo, "$GL_ADMINDIR/hooks/common");
|
||||||
# in case of package install, GL_ADMINDIR is no longer the top cop;
|
# new_repo would have chdir'd us away; come back
|
||||||
# override with the package hooks
|
wrap_chdir("$repo_base_abs");
|
||||||
ln_sf("$GL_PACKAGE_HOOKS/common", "*", "$repo.git/hooks") if $GL_PACKAGE_HOOKS;
|
}
|
||||||
|
|
||||||
|
# when repos are copied over from elsewhere, one had to run easy install
|
||||||
|
# once again to make the new (OS-copied) repo contain the proper update
|
||||||
|
# hook. Perhaps we can make this easier now, and eliminate the easy
|
||||||
|
# install, with a quick check (and a new, empty, "hook" as a sentinel)
|
||||||
|
unless (-l "$repo.git/hooks/gitolite-hooked") {
|
||||||
|
ln_sf("$GL_ADMINDIR/hooks/common", "*", "$repo.git/hooks");
|
||||||
|
# in case of package install, GL_ADMINDIR is no longer the top cop;
|
||||||
|
# override with the package hooks
|
||||||
|
ln_sf("$GL_PACKAGE_HOOKS/common", "*", "$repo.git/hooks") if $GL_PACKAGE_HOOKS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue