[why] Some repository have submodules. So when build packages, we need download submodules from LKP server, avoid the waste of time in downloading files from the remote end.
Signed-off-by: Liu Shaofei liushaofei5@huawei.com --- sbin/makepkg | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/sbin/makepkg b/sbin/makepkg index 25773621..afa665aa 100755 --- a/sbin/makepkg +++ b/sbin/makepkg @@ -623,6 +623,16 @@ extract_git() {
cd_safe "${dir##*/}"
+ # modify submodules address to local server address + # url = https://github.com/nico/demumble.git + # => + # url = git://172.168.131.113/submodules/b/bloaty/demumble.git + if [[ -f ".gitmodules" ]]; then + local project=${upstream_repo%/*} + local url="git://${LKP_SERVER}/submodules/${project}/" + sed -i "s|url = .*/|${url}|g" ".gitmodules" + fi + local ref=origin/HEAD if [[ -n $fragment ]]; then case ${fragment%%=*} in