mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-26 22:58:17 +08:00
Prepare init-repository script for moving v8 submodule
Transitional step needed while v8 is moved from qtdeclarative to qtbase. Before the transition is completely in place, init-repository must be able to cope with both qtbase and qtdeclarative having a v8 submodule. This change causes git submodule init/update to be called for both repositories, even though one of them doesn't have any submodules. But in that case it's a no-op. Change-Id: Ia1af01308c808e62eb85431764edd8c12bdc3325 Reviewed-on: http://codereview.qt.nokia.com/3303 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
@@ -629,7 +629,7 @@ sub git_clone_one_submodule
|
|||||||
unlink($alternates_path) || confess "unlink $alternates_path: $OS_ERROR";
|
unlink($alternates_path) || confess "unlink $alternates_path: $OS_ERROR";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($submodule eq "qtdeclarative") { #Extra step needed to setup declarative
|
if ($submodule eq "qtbase" || $submodule eq "qtdeclarative") { #Extra steps needed to setup base and declarative
|
||||||
$self->exe('git', 'submodule', 'init');
|
$self->exe('git', 'submodule', 'init');
|
||||||
if ($mirror_v8_url || $protocol eq 'http') {
|
if ($mirror_v8_url || $protocol eq 'http') {
|
||||||
my @configresult = qx(git config -l);
|
my @configresult = qx(git config -l);
|
||||||
@@ -640,23 +640,25 @@ sub git_clone_one_submodule
|
|||||||
$v8url = $1;
|
$v8url = $1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($protocol eq 'http') {
|
if ($v8url) {
|
||||||
# rewrite the git:// url to https://
|
if ($protocol eq 'http') {
|
||||||
if ($v8url =~ s{^git://github}{https://github}) {
|
# rewrite the git:// url to https://
|
||||||
$self->exe('git', 'config', 'submodule.src/3rdparty/v8.url', $v8url);
|
if ($v8url =~ s{^git://github}{https://github}) {
|
||||||
|
$self->exe('git', 'config', 'submodule.src/3rdparty/v8.url', $v8url);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
warn 'You requested git over http, but I could not figure out how to '
|
||||||
|
."rewrite v8's giturl of $v8url";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
warn 'You requested git over http, but I could not figure out how to '
|
|
||||||
."rewrite v8's giturl of $v8url";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mirror_v8_url && $do_clone) {
|
if ($mirror_v8_url && $do_clone) {
|
||||||
chdir('src/3rdparty/') or confess "chdir $submodule/src/3rdparty: $OS_ERROR";
|
chdir('src/3rdparty/') or confess "chdir $submodule/src/3rdparty: $OS_ERROR";
|
||||||
$self->exe('git', 'clone', $mirror_v8_url, 'v8');
|
$self->exe('git', 'clone', $mirror_v8_url, 'v8');
|
||||||
chdir('v8') or confess "chdir $submodule/src/3rdparty/v8: $OS_ERROR";
|
chdir('v8') or confess "chdir $submodule/src/3rdparty/v8: $OS_ERROR";
|
||||||
$self->exe('git', 'config', 'remote.origin.url', $v8url);
|
$self->exe('git', 'config', 'remote.origin.url', $v8url);
|
||||||
chdir('../../..') or confess "cd ../../..: $OS_ERROR";
|
chdir('../../..') or confess "cd ../../..: $OS_ERROR";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$self->exe('git', 'submodule', 'update');
|
$self->exe('git', 'submodule', 'update');
|
||||||
|
|||||||
Reference in New Issue
Block a user