On Wed, Nov 11, 2020 at 10:48:41AM +0800, Wu Fengguang wrote:
Another option is to setup git insteadOf. Can you compare which one is better?
By comparing two methods, i think the current method is better. Using "git insteadOf" has more uncertainty. In addition, the submodule repository in the "/srv/git/submodules" directory may be overwritten, and all submodule repository need to be located in the "/srv/git/submodules" directory. So, i think to keep this way.
Thanks, Liushaofei
Thanks, Fengguang
On Tue, Nov 10, 2020 at 09:16:06PM +0800, Liu Shaofei wrote:
[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 | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/sbin/makepkg b/sbin/makepkg index 25773621..050f4fac 100755 --- a/sbin/makepkg +++ b/sbin/makepkg @@ -623,6 +623,15 @@ extract_git() {
cd_safe "${dir##*/}"
- # modify submodules address to local server address.
- # upstream_repo is externlly imported variable, like this:
- # upstream_repo="c/czmq/czmq.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
-- 2.23.0