diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-08-15 19:11:24 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-09-23 20:29:02 +0200 |
commit | 6ab23f16f5bdceb5904b19445ff9942a145c0d46 (patch) | |
tree | a9ef2c596dd007cc1a67b5d08d657d269ff14657 | |
parent | 485f5f377614dfd361992d432b161d69a65e0861 (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>
-rw-r--r-- | .gitmodules | 29 | ||||
-rwxr-xr-x | init-repository | 42 |
2 files changed, 35 insertions, 36 deletions
diff --git a/.gitmodules b/.gitmodules index 1793289b..81d528c0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,51 +1,67 @@ [submodule "qtbase"] path = qtbase url = ../qtbase.git + initrepo = true [submodule "qtsvg"] path = qtsvg url = ../qtsvg.git + initrepo = true [submodule "qtdeclarative"] path = qtdeclarative url = ../qtdeclarative.git + initrepo = true [submodule "qtactiveqt"] path = qtactiveqt url = ../qtactiveqt.git + initrepo = true [submodule "qtscript"] path = qtscript url = ../qtscript.git + initrepo = true [submodule "qtmultimedia"] path = qtmultimedia url = ../qtmultimedia.git + initrepo = true [submodule "qttools"] path = qttools url = ../qttools.git + initrepo = true [submodule "qtxmlpatterns"] path = qtxmlpatterns url = ../qtxmlpatterns.git + initrepo = true [submodule "qttranslations"] path = qttranslations url = ../qttranslations.git + initrepo = true [submodule "qtdoc"] path = qtdoc url = ../qtdoc.git + initrepo = true [submodule "qtrepotools"] path = qtrepotools url = ../qtrepotools.git + initrepo = true [submodule "qtwebkit"] path = qtwebkit url = ../qtwebkit.git + initrepo = true [submodule "qtwebkit-examples"] path = qtwebkit-examples url = ../qtwebkit-examples.git + initrepo = true [submodule "qtqa"] path = qtqa url = ../qtqa.git + initrepo = true [submodule "qtlocation"] path = qtlocation url = ../qtlocation.git + initrepo = true [submodule "qtsensors"] path = qtsensors url = ../qtsensors.git + initrepo = true [submodule "qtsystems"] path = qtsystems url = ../qtsystems.git @@ -61,6 +77,7 @@ [submodule "qtconnectivity"] path = qtconnectivity url = ../qtconnectivity.git + initrepo = true [submodule "qtwayland"] path = qtwayland url = ../qtwayland.git @@ -73,39 +90,51 @@ [submodule "qtimageformats"] path = qtimageformats url = ../qtimageformats.git + initrepo = true [submodule "qtquick1"] path = qtquick1 url = ../qtquick1.git [submodule "qtgraphicaleffects"] path = qtgraphicaleffects url = ../qtgraphicaleffects.git + initrepo = true [submodule "qtquickcontrols"] path = qtquickcontrols url = ../qtquickcontrols.git + initrepo = true [submodule "qtserialport"] path = qtserialport url = ../qtserialport.git + initrepo = true [submodule "qtx11extras"] path = qtx11extras url = ../qtx11extras.git + initrepo = true [submodule "qtmacextras"] path = qtmacextras url = ../qtmacextras.git + initrepo = true [submodule "qtwinextras"] path = qtwinextras url = ../qtwinextras.git + initrepo = true [submodule "qtandroidextras"] path = qtandroidextras url = ../qtandroidextras.git + initrepo = true [submodule "qtenginio"] path = qtenginio url = ../qtenginio.git + initrepo = true [submodule "qtwebsockets"] path = qtwebsockets url = ../qtwebsockets.git + initrepo = true [submodule "qtwebchannel"] path = qtwebchannel url = ../qtwebchannel.git + initrepo = true [submodule "qtwebengine"] path = qtwebengine url = ../qtwebengine.git + initrepo = true 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 { |