Compare commits

...

42 Commits

Author SHA1 Message Date
Qt Submodule Update Bot
3439140073 Updated submodules.
Change-Id: I1998742ceac59b50864ccec46a6c2f255871ab30
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-12-05 10:51:00 +01:00
Qt Submodule Update Bot
1998742cea Updated submodules.
Change-Id: Ib1885ea72539f3bd2df4d4131f0b164b02d4b59f
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-12-04 13:50:13 +01:00
Qt Submodule Update Bot
b1885ea725 Updated submodules.
Change-Id: I338ee26271c05b612fc58381270ca471db12aaef
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-27 06:41:45 +01:00
Qt Submodule Update Bot
338ee26271 Updated submodules.
Change-Id: I77f387bc89c06d870b7d41516734ee3f1c68e71a
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-25 05:39:27 +01:00
Qt Submodule Update Bot
77f387bc89 Updated submodules.
Change-Id: I7c0bc2305680fac216bbaa72ac83f65b04feffff
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-21 09:26:31 +01:00
Qt Submodule Update Bot
7c0bc23056 Updated submodules.
Change-Id: I4b199501287c5a5961405ae0667c04dc1188af44
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-20 07:00:26 +01:00
Qt Submodule Update Bot
4b19950128 Updated submodules.
Change-Id: I96d903eec0ee9d2fd76e1e3f1ebfd868ad937dbe
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-19 05:46:17 +01:00
Qt Submodule Update Bot
96d903eec0 Updated submodules.
Change-Id: Ie8053418e43127327f6df892ae774a1707a9ae97
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-12 22:35:27 +01:00
Oswald Buddenhagen
38cfc8ec95 don't fetch unless we are updating
it's just wasting time.

Change-Id: I541cc535c5c95b0140cfa14d7cb042dbe029525e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-11-12 10:49:16 +01:00
Kai Koehne
402bf7aec2 Fix cloning with mirrors
Commit 486f5f37761 broke the cloning with one of the mirror options:

git ls-remote git://mirror/qt/qtactiveqt.git.git test/if/mirror/exists
fatal: The remote end hung up unexpectedly

Change-Id: Ia154ee34dd10e35b24676777d8dde98ef0790ee1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-12 10:49:07 +01:00
Kai Koehne
8f35cb2886 Fix description of --mirror argument
The argument actually requires a trailing slash.

Change-Id: Idc2567746d2b3f4ebf31c2bce5ec683d2a1f425b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-12 10:48:54 +01:00
Oswald Buddenhagen
d5946d420f teach init-repository about branches
specifically, add the --branch option and the necessary keys to
.gitmodules.

Change-Id: I09e2df6bd012629f76a35238d66697637bdffe44
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-11-12 10:48:37 +01:00
Qt Submodule Update Bot
e8053418e4 Updated submodules.
Change-Id: I201b4c135a571bdf2621cbac03a9ab46a352b60f
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-10 06:41:19 +01:00
Qt Submodule Update Bot
201b4c135a Updated submodules.
Change-Id: Ica7018cd4f892d0b6938ab276305f6ae02dcc07b
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-04 08:00:22 +01:00
Jan Arve Saether
00a3c36bc1 Ignore alternate if its not a git repo
Don't just check if the submodule folder exist, since that doesn't
qualify it for being a valid git repo.

Change-Id: Ia3902714a0554908c0b8fd3228ed6fc2cfddd344
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-11-03 12:50:42 +01:00
Qt Submodule Update Bot
ca7018cd4f Updated submodules.
Change-Id: I00e3f00b799e15d95895f70887cf5b1b6d3bc372
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
2014-11-03 07:59:03 +01:00
Qt Submodule Update Bot
00e3f00b79 Updated submodules.
Change-Id: Ia87766e218ab82cd1da216ea2cd023790fea6e8c
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-31 06:50:24 +01:00
Qt Submodule Update Bot
a87766e218 Updated submodules.
Change-Id: Ib54838f4a5c3ad05843c680252c45458a4572fb5
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-30 06:39:30 +01:00
Qt Submodule Update Bot
b54838f4a5 Updated submodules.
Change-Id: I18cc387deb811a2870842837353d6322511e1872
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-29 06:46:07 +01:00
Qt Submodule Update Bot
18cc387deb Updated submodules.
Change-Id: I86f7d9ce9873b5c6897e99763aba5765640ceba3
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-28 06:54:29 +01:00
Qt Submodule Update Bot
86f7d9ce98 Updated submodules.
Change-Id: I3f0739b279123e0a049d52da455f40ad1a20b4ab
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-23 17:46:28 +02:00
Bruno Coudoin
cd12d1f202 fix to let init-repository work on non english locale
This patch forces the C locale before calling 'git submodule'
in order to get the non localized string 'Entering' that we filter out.

Change-Id: I46d3770956a6b07e574ad15549bbb8942285b800
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-10-17 13:26:43 +02:00
Qt Submodule Update Bot
3f0739b279 Updated submodules.
Change-Id: Id8a40d65705b36a269accb68f7d82d7ee5fa925f
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-17 13:26:35 +02:00
Qt Submodule Update Bot
d8a40d6570 Updated submodules.
Change-Id: I2f80b640ab55f99b2379a41e6ce8c7df30f138a4
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-10-13 09:08:32 +02:00
Qt Submodule Update Bot
2f80b640ab Updated submodules.
Change-Id: Ib927255703d49def6c732f196a6265f6ed08a691
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-10-01 12:35:05 +02:00
Qt Submodule Update Bot
b927255703 Updated submodules.
Change-Id: I361f771ae66d1128f407992c228c1c76b0e69e4c
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-30 17:52:01 +02:00
Qt Submodule Update Bot
361f771ae6 Updated submodules.
Change-Id: Ie6af514f7185fc618f5093accedfb4f0937e5039
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-09-25 06:59:10 +02:00
Matti Paaso
d063e757b1 Adding qtquick1 and qtwayland also into submodule initialization
Without these components, src package creation fails in packaging.

Change-Id: I402c9c49642bccf821c3719206d1dea9415760c6
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Antti Kokko <antti.kokko@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-25 06:58:45 +02:00
Qt Submodule Update Bot
e6af514f71 Updated submodules.
Change-Id: Ib2e577904b850ea2ba3a8223688b05a21b4921f7
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-09-24 06:49:56 +02:00
Joerg Bornemann
597bb62d2b remove qtjsondb
It's dead, Jim.

Change-Id: Id8e1ddb266018bfd582af27bb7eb860287e4567c
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-23 20:29:32 +02:00
Oswald Buddenhagen
0af9ceef91 properly recurse submodule initialization
Change-Id: Icd438b9da9af0275dd508186a265bc211d9d01ce
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:29:12 +02:00
Oswald Buddenhagen
934651b766 don't unnecessarily initialize unwanted submodules
it wastes time and causes output noise.

Change-Id: Ifee01150293431b3c528f30a46280bd142e30b22
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:29:06 +02:00
Oswald Buddenhagen
836f00a76e don't uninit submodules before re-initing
git-submodule init will simply not touch the already initialized
submodules. this is just fine, as we'll overwrite the config entries
with our own urls (and remove the obsolete ones) afterwards anyway.

Change-Id: I6372bd48be9792e456899dc829226921990140c4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:29:04 +02:00
Oswald Buddenhagen
6ab23f16f5 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>
2014-09-23 20:29:02 +02:00
Oswald Buddenhagen
485f5f3776 don't pass around url unnecessarily
we now have everything we need to construct it on the fly.

Change-Id: I129e49bbcf46428d0fcef31ab8188df9d6a4026c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:29:01 +02:00
Oswald Buddenhagen
4553d9ec11 get submodule urls from .gitmodules
keeping a redundant copy in the script is plain backwards.

Change-Id: Ibdd1bab9d2cb5af7d7747d5caa2afc7d6e7571ad
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:28:59 +02:00
Oswald Buddenhagen
3ade7c4567 rewrite submodule exclusion logic
instead of doing multiple passes over the submodules, do everything in
one go.

as a bonus, as the internal structure uses exclusion entries in the
module list, we can make that feature user-accessible just as well.

Change-Id: I8bfb30c8051a9150f92e2e124ff52f64e3efe03c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:28:58 +02:00
Oswald Buddenhagen
93f173b3c5 nuke the --http option
it was a vestige from the times when the submodules had absolute urls
pointing at git://gitorious.org. as we now use relative urls, things
work just fine without that option.

Change-Id: I5e93ff8cd2497a27cfbdd53dbcf9db3cd0c4cd1d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-09-23 20:28:56 +02:00
Qt Submodule Update Bot
b2e577904b Updated submodules.
Change-Id: I919c0332ff9f5ad1979de3105721c2ba5aacf634
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-09-23 15:10:43 +02:00
Qt Submodule Update Bot
919c0332ff Updated submodules.
Change-Id: I1e275c54ea722d4f882cf329b65b749aa4d45fb2
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-09-15 17:09:26 +02:00
Qt Submodule Update Bot
1e275c54ea Updated submodules.
Change-Id: I5fdb4490cb85b3470bdbd81de9dccbe6bcb96460
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-09-11 16:30:52 +02:00
Jocelyn Turcotte
1ae0689829 init-repository: Support cases where $submodule/.git is a file
Since git 1.7.8 the $GIT_DIR of the submodule can be a reference to the
super-module's $GIT_DIR/modules/<name>/

Test for existence instead of testing for a directory before attempting
a git clone there.

Change-Id: Ic539e770067da1417a2ad374c21253212473abe6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-10 18:24:13 +02:00
35 changed files with 227 additions and 256 deletions

70
.gitmodules vendored
View File

@@ -1,111 +1,175 @@
[submodule "qtbase"]
path = qtbase
url = ../qtbase.git
branch = 5.4.0
initrepo = true
[submodule "qtsvg"]
path = qtsvg
url = ../qtsvg.git
branch = 5.4.0
initrepo = true
[submodule "qtdeclarative"]
path = qtdeclarative
url = ../qtdeclarative.git
branch = 5.4.0
initrepo = true
[submodule "qtactiveqt"]
path = qtactiveqt
url = ../qtactiveqt.git
branch = 5.4.0
initrepo = true
[submodule "qtscript"]
path = qtscript
url = ../qtscript.git
branch = 5.4.0
initrepo = true
[submodule "qtmultimedia"]
path = qtmultimedia
url = ../qtmultimedia.git
branch = 5.4.0
initrepo = true
[submodule "qttools"]
path = qttools
url = ../qttools.git
branch = 5.4.0
initrepo = true
[submodule "qtxmlpatterns"]
path = qtxmlpatterns
url = ../qtxmlpatterns.git
branch = 5.4.0
initrepo = true
[submodule "qttranslations"]
path = qttranslations
url = ../qttranslations.git
branch = 5.4.0
initrepo = true
[submodule "qtdoc"]
path = qtdoc
url = ../qtdoc.git
branch = 5.4.0
initrepo = true
[submodule "qtrepotools"]
path = qtrepotools
url = ../qtrepotools.git
branch = master
initrepo = true
[submodule "qtwebkit"]
path = qtwebkit
url = ../qtwebkit.git
branch = 5.4.0
initrepo = true
[submodule "qtwebkit-examples"]
path = qtwebkit-examples
url = ../qtwebkit-examples.git
branch = 5.4.0
initrepo = true
[submodule "qtqa"]
path = qtqa
url = ../qtqa.git
branch = master
initrepo = true
[submodule "qtlocation"]
path = qtlocation
url = ../qtlocation.git
branch = 5.4.0
initrepo = true
[submodule "qtsensors"]
path = qtsensors
url = ../qtsensors.git
branch = 5.4.0
initrepo = true
[submodule "qtsystems"]
path = qtsystems
url = ../qtsystems.git
branch = dev
[submodule "qtfeedback"]
path = qtfeedback
url = ../qtfeedback.git
branch = master
[submodule "qtdocgallery"]
path = qtdocgallery
url = ../qtdocgallery.git
branch = master
[submodule "qtpim"]
path = qtpim
url = ../qtpim.git
branch = dev
[submodule "qtconnectivity"]
path = qtconnectivity
url = ../qtconnectivity.git
branch = 5.4.0
initrepo = true
[submodule "qtwayland"]
path = qtwayland
url = ../qtwayland.git
[submodule "qtjsondb"]
path = qtjsondb
url = ../qtjsondb.git
branch = 5.4.0
initrepo = true
[submodule "qt3d"]
path = qt3d
url = ../qt3d.git
branch = dev
[submodule "qtimageformats"]
path = qtimageformats
url = ../qtimageformats.git
branch = 5.4.0
initrepo = true
[submodule "qtquick1"]
path = qtquick1
url = ../qtquick1.git
branch = 5.4.0
initrepo = true
[submodule "qtgraphicaleffects"]
path = qtgraphicaleffects
url = ../qtgraphicaleffects.git
branch = 5.4.0
initrepo = true
[submodule "qtquickcontrols"]
path = qtquickcontrols
url = ../qtquickcontrols.git
branch = 5.4.0
initrepo = true
[submodule "qtserialport"]
path = qtserialport
url = ../qtserialport.git
branch = 5.4.0
initrepo = true
[submodule "qtx11extras"]
path = qtx11extras
url = ../qtx11extras.git
branch = 5.4.0
initrepo = true
[submodule "qtmacextras"]
path = qtmacextras
url = ../qtmacextras.git
branch = 5.4.0
initrepo = true
[submodule "qtwinextras"]
path = qtwinextras
url = ../qtwinextras.git
branch = 5.4.0
initrepo = true
[submodule "qtandroidextras"]
path = qtandroidextras
url = ../qtandroidextras.git
branch = 5.4.0
initrepo = true
[submodule "qtenginio"]
path = qtenginio
url = ../qtenginio.git
branch = 1.1.0
initrepo = true
[submodule "qtwebsockets"]
path = qtwebsockets
url = ../qtwebsockets.git
branch = 5.4.0
initrepo = true
[submodule "qtwebchannel"]
path = qtwebchannel
url = ../qtwebchannel.git
branch = 5.4.0
initrepo = true
[submodule "qtwebengine"]
path = qtwebengine
url = ../qtwebengine.git
branch = 5.4.0
initrepo = true

View File

@@ -99,11 +99,18 @@ 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.
=item --no-update
Skip the `git submodule update' command.
=item --branch
Instead of checking out specific SHA1s, check out the submodule branches that
correspond with the current supermodule commit.
By default, this option will cause local commits in the submodules to be rebased.
With --no-update, the branches will be checked out, but their heads will not move.
=item --ignore-submodules
@@ -131,15 +138,6 @@ Switch to internal URLs and make use of the Oslo git mirrors.
(Implies `--mirror').
=item --http
Use the HTTP protocol for git operations. This may be useful if the git
protocol is blocked by a firewall. Note that this only works with the
external Gitorious server.
The `--http' option does not affect the gerrit remotes.
=item --codereview-username <Gerrit/JIRA username>
Specify the user name for the (potentially) writable `gerrit' remote
@@ -180,7 +178,7 @@ Uses <url-base> as the base URL for submodule git mirrors.
For example:
--mirror user@machine:/foo/bar
--mirror user@machine:/foo/bar/
...will use the following as a mirror for qtbase:
@@ -199,85 +197,6 @@ use Getopt::Long qw( GetOptionsFromArray );
use Pod::Usage qw( pod2usage );
use Cwd qw( getcwd );
my %PROTOCOLS = (
'http' => 'http://git.gitorious.org/' ,
);
my %GERRIT_REPOS = map { $_ => "qt/$_" } qw(
qt3d
qt5
qtactiveqt
qtandroidextras
qtbase
qtconnectivity
qtdeclarative
qtdoc
qtdocgallery
qtenginio
qtfeedback
qtgraphicaleffects
qtimageformats
qtjsondb
qtlocation
qtmacextras
qtmultimedia
qtpim
qtqa
qtquick1
qtquickcontrols
qtrepotools
qtscript
qtsensors
qtserialport
qtsvg
qtsystems
qttools
qttranslations
qtwayland
qtwebchannel
qtwebengine
qtwebkit
qtwebkit-examples
qtwebsockets
qtwinextras
qtx11extras
qtxmlpatterns
);
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@/';
@@ -320,20 +239,21 @@ sub parse_arguments
%{$self} = (%{$self},
'alternates' => "",
'branch' => 0,
'codereview-username' => "",
'detach-alternates' => 0 ,
'force' => 0 ,
'force-hooks' => 0 ,
'ignore-submodules' => 0 ,
'mirror-url' => "",
'protocol' => "",
'update' => 1 ,
'webkit' => 1 ,
'module-subset' => join(",", @DEFAULT_REPOS),
'module-subset' => "default",
);
GetOptionsFromArray(\@args,
'alternates=s' => \$self->{qw{ alternates }},
'branch' => \$self->{qw{ branch }},
'codereview-username=s' => \$self->{qw{ codereview-username }},
'copy-objects' => \$self->{qw{ detach-alternates }},
'force|f' => \$self->{qw{ force }},
@@ -346,7 +266,6 @@ sub parse_arguments
'module-subset=s' => \$self->{qw{ module-subset }},
'help|?' => sub { pod2usage(1); },
'http' => sub { $self->{protocol} = 'http'; },
'berlin' => sub {
$self->{'mirror-url'} = $BER_MIRROR_URL_BASE;
@@ -359,12 +278,9 @@ sub parse_arguments
# Replace any double trailing slashes from end of mirror
$self->{'mirror-url'} =~ s{//+$}{/};
if ($self->{'module-subset'} eq "all") {
$self->{'module-subset'} = "";
} else {
$self->{'module-subset'} = {
map { $_ => 1 } split(qr{,}, $self->{'module-subset'})
};
$self->{'module-subset'} = [ split(/,/, $self->{'module-subset'}) ];
if (!$self->{webkit}) {
push @{$self->{'module-subset'}}, "-qtwebkit", "-qtwebkit-examples";
}
return;
@@ -376,16 +292,7 @@ sub check_if_already_initialized
# We consider the repo as `initialized' if submodule.qtbase.url is set
if (qx(git config --get submodule.qtbase.url)) {
if ($self->{force}) {
my @configresult = qx(git config -l);
foreach (@configresult) {
# Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
if (/(submodule\.[^.=]+)\.url=.*/) {
$self->exe('git', 'config', '--remove-section', $1);
}
}
}
else {
if (!$self->{force}) {
exit 0 if ($self->{quiet});
print "Will not reinitialize already initialized repository (use -f to force)!\n";
exit 1;
@@ -397,11 +304,10 @@ sub check_if_already_initialized
sub git_submodule_init
{
my ($self) = @_;
my ($self, @init_args) = @_;
my @init_args;
if ($self->{quiet}) {
push @init_args, '--quiet';
unshift @init_args, '--quiet';
}
$self->exe('git', 'submodule', 'init', @init_args);
@@ -413,83 +319,98 @@ sub git_submodule_init
return;
}
sub git_disable_webkit_submodule
{
my ($self) = @_;
$self->exe('git', 'config', '--remove', 'submodule.qtwebkit');
$self->exe('git', 'config', '--remove', 'submodule.qtwebkit-examples');
return;
}
sub git_prune_submodules
{
my ($self) = @_;
my @configresult = qx(git config -l);
foreach my $line (@configresult) {
if ($line =~ /submodule\.([^.=]+)\.url=/) {
my $module_name = $1;
if (!$self->{'module-subset'}{$module_name}) {
$self->exe('git', 'config', '--remove', "submodule.$module_name");
}
}
}
}
sub git_set_submodule_config
{
my ($self) = @_;
my @configresult = qx(git config -l);
my $protocol = $self->{protocol};
my $url_base_for_protocol = $PROTOCOLS{$protocol};
foreach my $line (@configresult) {
# Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
next if ($line !~ /submodule\.([^.=]+)\.url=(.*)/);
my $key = $1;
my $value = $2;
if ($protocol) {
# rewrite URL to chosen protocol
$value =~ s,^git://gitorious\.org/,$url_base_for_protocol,;
}
$self->exe('git', 'config', "submodule.$key.url", $value);
if ($self->{'ignore-submodules'}) {
$self->exe('git', 'config', "submodule.$key.ignore", 'all');
}
}
return;
}
sub git_clone_all_submodules
{
my ($self) = @_;
my ($self, $my_repo_base, $co_branch, @subset) = @_;
my %subdirs = ();
my %subbranches = ();
my %subbases = ();
my %subinits = ();
my @submodconfig = qx(git config -l -f .gitmodules);
foreach my $line (@submodconfig) {
# Example line: submodule.qtqa.url=../qtqa.git
next if ($line !~ /^submodule\.([^.=]+)\.([^.=]+)=(.*)$/);
if ($2 eq "path") {
$subdirs{$1} = $3;
} elsif ($2 eq "branch") {
$subbranches{$1} = $3;
} elsif ($2 eq "url") {
my ($mod, $base) = ($1, $3);
next if ($base !~ /^\.\.\//);
$base = $my_repo_base.'/'.$base;
while ($base =~ s,/(?!\.\./)[^/]+/\.\./,/,g) {}
$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");
}
}
my %include = ();
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 {
$include{$mod} = 1;
}
}
my @modules = sort keys %include;
$self->git_submodule_init(map { $subdirs{$_} } @modules);
# manually clone each repo here, so we can easily use reference repos, mirrors etc
my @configresult = qx(git config -l);
foreach my $line (@configresult) {
if ($line =~ /submodule\.([^.=]+)\.url=(.*)/) {
$self->git_clone_one_submodule($1, $2);
if ($1 eq "qtwebengine") {
$self->exe('git', 'submodule', 'update', $1);
my $orig_cwd = getcwd();
chdir($1) or confess "chdir $1: $OS_ERROR";
$self->exe('git', 'submodule', 'init');
$self->git_clone_all_submodules;
chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
}
# Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
next if ($line !~ /submodule\.([^.=]+)\.url=/);
my $module = $1;
if (!defined($include{$module})) {
$self->exe('git', 'config', '--remove-section', "submodule.$module");
next;
}
if ($self->{'ignore-submodules'}) {
$self->exe('git', 'config', "submodule.$module.ignore", 'all');
}
}
foreach my $module (@modules) {
$self->git_clone_one_submodule($subdirs{$module}, $subbases{$module});
}
if ($self->{update}) {
$self->exe('git', 'submodule', 'update', '--recursive');
$self->exe('git', 'submodule', 'update', ($co_branch ? ('--remote', '--rebase') : ()));
foreach my $module (@modules) {
if (-f $module.'/.gitmodules') {
my $orig_cwd = getcwd();
chdir($module) or confess "chdir $module: $OS_ERROR";
$self->git_clone_all_submodules($subbases{$module}, 0, "all");
chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
}
}
} elsif ($co_branch) {
foreach my $module (@modules) {
my $branch = $subbranches{$module};
die("No branch defined for submodule $module.\n") if (!defined($branch));
my $orig_cwd = getcwd();
chdir($module) or confess "chdir $module: $OS_ERROR";
my $br = qx(git rev-parse -q --verify $branch);
if (!$br) {
$self->exe('git', 'checkout', '-b', $branch, "origin/$branch");
} else {
$self->exe('git', 'checkout', $branch);
}
chdir("$orig_cwd") or confess "chdir $orig_cwd: $OS_ERROR";
}
}
return;
@@ -497,35 +418,26 @@ sub git_clone_all_submodules
sub git_add_remotes
{
my ($self, $repo_basename) = @_;
my ($self, $gerrit_repo_basename) = @_;
my $gerrit_repo_basename = $GERRIT_REPOS{$repo_basename};
if ($gerrit_repo_basename) {
my $gerrit_repo_url;
# If given a username, make a "verbose" remote.
# Otherwise, rely on proper SSH configuration.
if ($self->{'codereview-username'}) {
$gerrit_repo_url = $GERRIT_SSH_BASE;
$gerrit_repo_url =~ s,\@USER\@,$self->{'codereview-username'}\@,;
$gerrit_repo_url =~ s,\@PORT\@,:29418,;
}
else {
$gerrit_repo_url = $GERRIT_SSH_BASE;
$gerrit_repo_url =~ s,\@[^\@]+\@,,g;
}
$gerrit_repo_url .= $gerrit_repo_basename;
$self->exe('git', 'config', 'remote.gerrit.url', $gerrit_repo_url);
$self->exe('git', 'config', 'remote.gerrit.fetch', '+refs/heads/*:refs/remotes/gerrit/*', '/heads/');
my $gerrit_repo_url = $GERRIT_SSH_BASE;
# If given a username, make a "verbose" remote.
# Otherwise, rely on proper SSH configuration.
if ($self->{'codereview-username'}) {
$gerrit_repo_url =~ s,\@USER\@,$self->{'codereview-username'}\@,;
$gerrit_repo_url =~ s,\@PORT\@,:29418,;
} else {
$gerrit_repo_url =~ s,\@[^\@]+\@,,g;
}
return;
$gerrit_repo_url .= $gerrit_repo_basename;
$self->exe('git', 'config', 'remote.gerrit.url', $gerrit_repo_url);
$self->exe('git', 'config', 'remote.gerrit.fetch', '+refs/heads/*:refs/remotes/gerrit/*', '/heads/');
}
sub git_clone_one_submodule
{
my ($self, $submodule, $url) = @_;
my ($self, $submodule, $repo_basename) = @_;
my $alternates = $self->{ 'alternates' };
my $mirror_url = $self->{ 'mirror-url' };
@@ -536,7 +448,7 @@ sub git_clone_one_submodule
if ($alternates) {
# alternates is a qt5 repo, so the submodule will be under that.
if (-d "$alternates/$submodule") {
if (-e "$alternates/$submodule/.git") {
@reference_args = ('--reference', "$alternates/$submodule");
}
else {
@@ -544,10 +456,10 @@ sub git_clone_one_submodule
}
}
my $url = $self->{'base-url'}.$repo_basename;
my $mirror;
if ($mirror_url and $url =~ /\/(qt\/[^.]+)\.git/) {
$mirror = $mirror_url.$1;
$mirror .= ".git" unless (-d $mirror); # Support local disk mirror
if ($mirror_url) {
$mirror = $mirror_url.$repo_basename;
}
if ($mirror) {
@@ -559,7 +471,7 @@ sub git_clone_one_submodule
}
}
my $do_clone = (! -d "$submodule/.git");
my $do_clone = (! -e "$submodule/.git");
if ($do_clone) {
$self->exe('git', 'clone', @reference_args, ($mirror ? $mirror : $url), $submodule);
}
@@ -573,7 +485,7 @@ sub git_clone_one_submodule
$self->exe('git', 'config', 'remote.mirror.fetch', '+refs/heads/*:refs/remotes/mirror/*');
}
if (!$do_clone) {
if (!$do_clone && $self->{update}) {
$self->exe('git', 'fetch', ($mirror ? $mirror : $url));
}
@@ -582,7 +494,7 @@ sub git_clone_one_submodule
$self->exe('git', 'config', 'commit.template', $template);
}
$self->git_add_remotes($submodule);
$self->git_add_remotes($repo_basename);
if ($self->{'detach-alternates'}) {
$self->exe('git', 'repack', '-a');
@@ -618,6 +530,8 @@ sub git_install_hooks
return if (!-d 'qtrepotools/git-hooks');
# Force C locale as git submodule returns the localized string "Entering"
local $ENV{LC_ALL} = 'C';
chomp(my @modules = `git submodule foreach :`);
push @modules, "";
for my $module (@modules) {
@@ -635,21 +549,16 @@ sub run
my ($self) = @_;
$self->check_if_already_initialized;
$self->git_submodule_init;
if (!$self->{webkit}) {
$self->git_disable_webkit_submodule;
}
chomp(my $url = `git config remote.origin.url`);
die("Have no origin remote.\n") if (!$url);
$url =~ s,\.git$,,;
$url =~ s,qt/qt5$,,;
$self->{'base-url'} = $url;
if ($self->{'module-subset'}) {
$self->git_prune_submodules;
}
$self->git_clone_all_submodules('qt/qt5', $self->{branch}, @{$self->{'module-subset'}});
$self->git_set_submodule_config;
$self->git_clone_all_submodules;
$self->git_add_remotes('qt5');
$self->git_add_remotes('qt/qt5');
$self->git_install_hooks;

3
qt.pro
View File

@@ -69,7 +69,6 @@ addModule(qtmultimedia, qtbase, qtdeclarative)
addModule(qtwinextras, qtbase, qtdeclarative qtmultimedia)
addModule(qtactiveqt, qtbase)
addModule(qt3d, qtdeclarative)
addModule(qtjsondb, qtdeclarative)
addModule(qtsystems, qtbase, qtdeclarative)
addModule(qtlocation, qtbase, qtsystems qtmultimedia)
addModule(qtsensors, qtbase, qtdeclarative)
@@ -85,7 +84,7 @@ addModule(qtimageformats, qtbase)
addModule(qtgraphicaleffects, qtdeclarative)
addModule(qtscript, qtbase, qttools)
addModule(qtquick1, qtscript, qtsvg qtxmlpatterns qtwebkit)
addModule(qtdocgallery, qtdeclarative, qtjsondb)
addModule(qtdocgallery, qtdeclarative)
linux:!android: addModule(qtwayland, qtbase, qtdeclarative)
addModule(qtserialport, qtbase)
addModule(qtenginio, qtdeclarative)

2
qtbase

Submodule qtbase updated: 289e9af668...5367fa3562

2
qtdoc

Submodule qtdoc updated: a1a4cb2964...251f5eaa2d

Submodule qtjsondb deleted from 58223ab8aa

2
qtqa

Submodule qtqa updated: b0f1609d11...6ded39926b

2
qtsvg

Submodule qtsvg updated: 33e7b0c07b...eece19e626

Submodule qttools updated: f2acb10367...5060a0ec7d