submoudles => submodules
The submodules should still be downloaded somewhere?
Thanks, Fengguang
On Tue, Feb 09, 2021 at 03:37:12PM +0800, Liu Shaofei wrote:
[why] When building software package by cci-makepkg, the source codes repository contains submodules. By default, these submodules are downloaded from the local server, but the local server does not have submodules download address. So the submodules repository fails to be downloaded to test machine during the build.
Signed-off-by: Liu Shaofei 370072077@qq.com
sbin/makepkg | 15 +++++++++++---- tests/cci-makepkg | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/sbin/makepkg b/sbin/makepkg index 7a92ea71b..639454d3b 100755 --- a/sbin/makepkg +++ b/sbin/makepkg @@ -587,6 +587,15 @@ download_git() { fi }
+# modify submodules address to local server address. +modify_gitmodules() {
- [ "$DISABLE_SUBMODULES" == "true" ] || return
- if [[ -f ".gitmodules" ]] && [[ -n ${LKP_SERVER} ]]; then
echo -e "[url \"git://${LKP_SERVER}/\"]\n\tinsteadOf = https://" >> /etc/gitconfig
- fi
+}
extract_git() { local netfile=$1
@@ -623,10 +632,7 @@ extract_git() {
cd_safe "${dir##*/}"
- # modify submodules address to local server address.
- if [[ -f ".gitmodules" ]] && [[ -n ${LKP_SERVER} ]]; then
echo -e "[url \"git://${LKP_SERVER}/\"]\n\tinsteadOf = https://" >> /etc/gitconfig
- fi
modify_gitmodules
local ref=origin/HEAD if [[ -n $fragment ]]; then
@@ -3668,6 +3674,7 @@ SRCEXT=${_SRCEXT:-$SRCEXT} GPGKEY=${_GPGKEY:-$GPGKEY} PACKAGER=${_PACKAGER:-$PACKAGER} CARCH=${_CARCH:-$CARCH} +DISABLE_SUBMODULES=${DISABLE_SUBMODULES:-false}
if (( INFAKEROOT )); then if [[ -z $FAKEROOTKEY ]]; then diff --git a/tests/cci-makepkg b/tests/cci-makepkg index ecbf72134..59f18d9a7 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -142,7 +142,7 @@ build_source_pkg() local makepkg="$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf" echo "${makepkg}"
- PACMAN="${mark}" BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
PACMAN="${mark}" DISABLE_SUBMODULES=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
[ "$?" == 0 ] || exit 1 update_softlink
-- 2.23.0