replace 'initrepo' with more fine-grained 'status'

instead of a simple bool, we now have five states: preview, active,
addon, obsolete, and ignore (the default). the default includes the
first three.

the CI system is expected to use --module-subset=all,-ignore to include
everything that is expected to build (in some configurations).

Change-Id: Ifb43412054a8e42db0425f24f8e53acfce363caa
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Oswald Buddenhagen
2016-01-27 14:45:35 +01:00
committed by Frederik Gladhorn
parent f5ba19c3f0
commit 3de19487d9
2 changed files with 77 additions and 39 deletions

73
.gitmodules vendored
View File

@@ -2,72 +2,72 @@
path = qtbase
url = ../qtbase.git
branch = 5.6.0
initrepo = true
status = essential
[submodule "qtsvg"]
depends = qtbase
path = qtsvg
url = ../qtsvg.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtdeclarative"]
depends = qtbase
recommends = qtsvg qtxmlpatterns
path = qtdeclarative
url = ../qtdeclarative.git
branch = 5.6.0
initrepo = true
status = essential
[submodule "qtactiveqt"]
depends = qtbase
path = qtactiveqt
url = ../qtactiveqt.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtscript"]
depends = qtbase
recommends = qttools
path = qtscript
url = ../qtscript.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtmultimedia"]
depends = qtbase
recommends = qtdeclarative
path = qtmultimedia
url = ../qtmultimedia.git
branch = 5.6.0
initrepo = true
status = essential
[submodule "qttools"]
depends = qtbase
recommends = qtdeclarative qtactiveqt qtwebkit
path = qttools
url = ../qttools.git
branch = 5.6.0
initrepo = true
status = essential
[submodule "qtxmlpatterns"]
depends = qtbase
path = qtxmlpatterns
url = ../qtxmlpatterns.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qttranslations"]
depends = qttools
path = qttranslations
url = ../qttranslations.git
branch = 5.6.0
initrepo = true
status = essential
priority = 30
[submodule "qtdoc"]
depends = qtdeclarative
path = qtdoc
url = ../qtdoc.git
branch = 5.6.0
initrepo = true
status = essential
priority = 40
[submodule "qtrepotools"]
path = qtrepotools
url = ../qtrepotools.git
branch = master
initrepo = true
status = essential
qt = false
[submodule "qtwebkit"]
depends = qtbase
@@ -75,6 +75,7 @@
path = qtwebkit
url = ../qtwebkit.git
branch = 5.6
status = obsolete
project = WebKit.pro
priority = 20
[submodule "qtwebkit-examples"]
@@ -82,12 +83,13 @@
path = qtwebkit-examples
url = ../qtwebkit-examples.git
branch = 5.6
status = obsolete
[submodule "qtqa"]
depends = qtbase
path = qtqa
url = ../qtqa.git
branch = master
initrepo = true
status = essential
priority = 50
[submodule "qtlocation"]
depends = qtbase
@@ -95,167 +97,174 @@
path = qtlocation
url = ../qtlocation.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtsensors"]
depends = qtbase
recommends = qtdeclarative
path = qtsensors
url = ../qtsensors.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtsystems"]
depends = qtbase
recommends = qtdeclarative
path = qtsystems
url = ../qtsystems.git
branch = dev
status = ignore
[submodule "qtfeedback"]
depends = qtdeclarative
recommends = qtmultimedia
path = qtfeedback
url = ../qtfeedback.git
branch = master
status = ignore
[submodule "qtdocgallery"]
depends = qtdeclarative
path = qtdocgallery
url = ../qtdocgallery.git
branch = master
status = ignore
[submodule "qtpim"]
depends = qtdeclarative
path = qtpim
url = ../qtpim.git
branch = dev
status = ignore
[submodule "qtconnectivity"]
depends = qtbase
recommends = qtdeclarative qtandroidextras
path = qtconnectivity
url = ../qtconnectivity.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtwayland"]
depends = qtbase
recommends = qtdeclarative
path = qtwayland
url = ../qtwayland.git
branch = 5.6.0
initrepo = true
status = preview
[submodule "qt3d"]
depends = qtdeclarative qtimageformats
path = qt3d
url = ../qt3d.git
branch = 5.6.0
initrepo = true
status = preview
[submodule "qtimageformats"]
depends = qtbase
path = qtimageformats
url = ../qtimageformats.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtquick1"]
depends = qtscript
recommends = qtsvg qtxmlpatterns
path = qtquick1
url = ../qtquick1.git
branch = 5.6
status = obsolete
[submodule "qtgraphicaleffects"]
depends = qtdeclarative
path = qtgraphicaleffects
url = ../qtgraphicaleffects.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtquickcontrols"]
depends = qtdeclarative
recommends = qtgraphicaleffects
path = qtquickcontrols
url = ../qtquickcontrols.git
branch = 5.6.0
initrepo = true
status = essential
[submodule "qtserialbus"]
depends = qtserialport
path = qtserialbus
url = ../qtserialbus.git
branch = 5.6
status = preview
[submodule "qtserialport"]
depends = qtbase
path = qtserialport
url = ../qtserialport.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtx11extras"]
depends = qtbase
path = qtx11extras
url = ../qtx11extras.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtmacextras"]
depends = qtbase
path = qtmacextras
url = ../qtmacextras.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtwinextras"]
depends = qtbase
recommends = qtdeclarative qtmultimedia
path = qtwinextras
url = ../qtwinextras.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtandroidextras"]
depends = qtbase
path = qtandroidextras
url = ../qtandroidextras.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtenginio"]
depends = qtdeclarative
path = qtenginio
url = ../qtenginio.git
branch = 1.6.0
initrepo = true
status = obsolete
[submodule "qtwebsockets"]
depends = qtbase
recommends = qtdeclarative
path = qtwebsockets
url = ../qtwebsockets.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtwebchannel"]
depends = qtbase
recommends = qtdeclarative qtwebsockets
path = qtwebchannel
url = ../qtwebchannel.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtwebengine"]
depends = qtquickcontrols qtwebchannel
recommends = qtlocation
path = qtwebengine
url = ../qtwebengine.git
branch = 5.6.0
initrepo = true
status = addon
priority = 10
[submodule "qtcanvas3d"]
depends = qtdeclarative
path = qtcanvas3d
url = ../qtcanvas3d.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtwebview"]
depends = qtdeclarative
recommends = qtwebengine
path = qtwebview
url = ../qtwebview.git
branch = 5.6.0
initrepo = true
status = addon
[submodule "qtquickcontrols2"]
depends = qtquickcontrols
path = qtquickcontrols2
url = ../qtquickcontrols2.git
branch = 5.6.0
initrepo = true
status = preview
[submodule "qtpurchasing"]
depends = qtbase
recommends = qtdeclarative
path = qtpurchasing
url = ../qtpurchasing.git
branch = 5.6
status = ignore

View File

@@ -71,9 +71,12 @@ Options:
--module-subset=<module1>,<module2>...
Only initialize the specified subset of modules given as the
argument. Specified modules must already exist in .gitmodules. The
string "all" results in cloning all known modules. The default is
the set of maintained modules. Module names may be prefixed with a
dash to exclude them from a bigger set.
string "all" results in cloning all known modules. The strings
"essential", "addon", "preview", "obsolete", and "ignore" refer to
classes of modules; "default" maps to "essential,addon,preview",
which corresponds with the set of maintained modules and is also
the default set. Module names may be prefixed with a dash to
exclude them from a bigger set, e.g. "all,-ignore".
--no-update
Skip the `git submodule update' command.
@@ -234,6 +237,7 @@ sub parse_arguments
# Replace any double trailing slashes from end of mirror
$self->{'mirror-url'} =~ s{//+$}{/};
$self->{'module-subset'} =~ s/\bdefault\b/preview,essential,addon/;
$self->{'module-subset'} = [ split(/,/, $self->{'module-subset'}) ];
return;
@@ -272,6 +276,13 @@ sub git_submodule_init
return;
}
use constant {
STS_PREVIEW => 1,
STS_ESSENTIAL => 2,
STS_ADDON => 3,
STS_OBSOLETE => 4
};
sub git_clone_all_submodules
{
my ($self, $my_repo_base, $co_branch, @subset) = @_;
@@ -296,8 +307,20 @@ sub git_clone_all_submodules
$subbases{$mod} = $base;
} elsif ($2 eq "update") {
push @subset, '-'.$1 if ($3 eq 'none');
} elsif ($2 eq "initrepo") {
$subinits{$1} = ($3 eq "yes" or $3 eq "true");
} elsif ($2 eq "status") {
if ($3 eq "preview") {
$subinits{$1} = STS_PREVIEW;
} elsif ($3 eq "essential") {
$subinits{$1} = STS_ESSENTIAL;
} elsif ($3 eq "addon") {
$subinits{$1} = STS_ADDON;
} elsif ($3 eq "obsolete") {
$subinits{$1} = STS_OBSOLETE;
} elsif ($3 eq "ignore") {
delete $subinits{$1};
} else {
die("Invalid subrepo status '$3' for '$1'.\n");
}
}
}
@@ -305,8 +328,14 @@ 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 eq "essential") {
map { $include{$_} = 1; } grep { ($subinits{$_} || 0) eq STS_ESSENTIAL } keys %subbases;
} elsif ($mod eq "addon") {
map { $include{$_} = 1; } grep { ($subinits{$_} || 0) eq STS_ADDON } keys %subbases;
} elsif ($mod eq "preview") {
map { $include{$_} = 1; } grep { ($subinits{$_} || 0) eq STS_PREVIEW } keys %subbases;
} elsif ($mod eq "obsolete") {
map { $include{$_} = 1; } grep { ($subinits{$_} || 0) eq STS_OBSOLETE } keys %subbases;
} elsif ($mod =~ s/^-//) {
delete $include{$mod};
} else {