Qt:初始化存储库中止与"fatal: Needed a single revision"



我正在尝试从 git 源代码构建 Qt5 的修订版 5.9,但更新子模块失败:

git clone https://github.com/qt/qt5.git
cd qt5
git checkout 5.9
./init-repository
...
... lots of submodules being updated successfully
...
fatal: Needed a single revision
Unable to find current revision in submodule path 'qtnetworkauth'
git submodule update --force --no-fetch exited with status 256 at ./init-repository line 198.
    Qt::InitRepository::exe(Qt::InitRepository=HASH(0x1fa94b0), "git", "submodule", "update", "--force", "--no-fetch") called at ./init-repository line 429
    Qt::InitRepository::git_clone_all_submodules(Qt::InitRepository=HASH(0x1fa94b0), "qt/qt5", 0, "preview", "essential", "addon", "deprecated") called at ./init-repository line 644
    Qt::InitRepository::run(Qt::InitRepository=HASH(0x1fa94b0)) called at ./init-repository line 655

所以看起来qtnetworkauth配置错误,但我不知道如何解决。我试图通过删除.gitmodulesqtdoc和文件夹本身中的引用来删除qtnetworkauth模块,但随后其他模块失败。

奇怪的是 - 当我在删除并添加对qtnetworkauth的引用后运行./init-repository -f时,我可以看到它正在被签出,但子模块文件夹仍然是空的:

...
+ git clone --no-checkout https://github.com/qt/qtnetworkauth qtnetworkauth
Cloning into 'qtnetworkauth'...
remote: Counting objects: 283, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 283 (delta 3), reused 0 (delta 0), pack-reused 269
Receiving objects: 100% (283/283), 200.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (139/139), done.
Checking connectivity... done.
+ git config commit.template /home/frans/_HOME/0000_android_dev/qt5/.commit-template
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtnetworkauth
...

我能做错什么?或者,如果这是一个Qt错误 - 我该如何解决它?

在实际获取所有存储库之前,您正在更改分支。这可能会破坏./init-repository脚本中的某些内容。

我已经检查了这个序列是否有效:

git clone git://code.qt.io/qt/qt5.git
cd qt5/
./init-repository
git checkout 5.9
git submodule update

相关内容

  • 没有找到相关文章

最新更新