summaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-08-15 19:11:24 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2014-09-23 20:29:02 +0200
commit6ab23f16f5bdceb5904b19445ff9942a145c0d46 (patch)
treea9ef2c596dd007cc1a67b5d08d657d269ff14657 /init-repository
parent485f5f377614dfd361992d432b161d69a65e0861 (diff)
keep information about default repos in .gitmodules
it's backwards to keep this in the script itself. Change-Id: I4248ba3fef984bdff5d034cb2e6db6cae3209d68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository42
1 files changed, 6 insertions, 36 deletions
diff --git a/init-repository b/init-repository
index 985d042a..4eaeb17d 100755
--- a/init-repository
+++ b/init-repository
@@ -191,40 +191,6 @@ use Getopt::Long qw( GetOptionsFromArray );
use Pod::Usage qw( pod2usage );
use Cwd qw( getcwd );
-my @DEFAULT_REPOS = qw(
- qtactiveqt
- qtandroidextras
- qtbase
- qtconnectivity
- qtdeclarative
- qtdoc
- qtenginio
- qtgraphicaleffects
- qtimageformats
- qtmacextras
- qtmultimedia
- qtqa
- qtquick1
- qtquickcontrols
- qtlocation
- qtrepotools
- qtscript
- qtsensors
- qtserialport
- qtsvg
- qttools
- qttranslations
- qtwayland
- qtwebchannel
- qtwebengine
- qtwebsockets
- qtwebkit
- qtwebkit-examples
- qtwinextras
- qtx11extras
- qtxmlpatterns
-);
-
my $GERRIT_SSH_BASE
= 'ssh://@USER@codereview.qt-project.org@PORT@/';
@@ -304,8 +270,7 @@ sub parse_arguments
# Replace any double trailing slashes from end of mirror
$self->{'mirror-url'} =~ s{//+$}{/};
- $self->{'module-subset'} = [ map { $_ eq "default" ? (@DEFAULT_REPOS) : ($_) }
- split(/,/, $self->{'module-subset'}) ];
+ $self->{'module-subset'} = [ split(/,/, $self->{'module-subset'}) ];
if (!$self->{webkit}) {
push @{$self->{'module-subset'}}, "-qtwebkit", "-qtwebkit-examples";
}
@@ -362,6 +327,7 @@ sub git_clone_all_submodules
my %subdirs = ();
my %subbases = ();
+ my %subinits = ();
my @submodconfig = qx(git config -l -f .gitmodules);
foreach my $line (@submodconfig) {
# Example line: submodule.qtqa.url=../qtqa.git
@@ -376,6 +342,8 @@ sub git_clone_all_submodules
$subbases{$mod} = $base;
} elsif ($2 eq "update") {
push @subset, '-'.$1 if ($3 eq 'ignore');
+ } elsif ($2 eq "initrepo") {
+ $subinits{$1} = ($3 eq "yes" or $3 eq "true");
}
}
@@ -383,6 +351,8 @@ sub git_clone_all_submodules
foreach my $mod (@subset) {
if ($mod eq "all") {
map { $include{$_} = 1; } keys %subbases;
+ } elsif ($mod eq "default") {
+ map { $include{$_} = 1; } grep { $subinits{$_} } keys %subbases;
} elsif ($mod =~ s/^-//) {
delete $include{$mod};
} else {