git.sh: *never* run git submodule update
only use config/submodules/ which the build system then uses to run git clones manually, replicating the submodules feature. we must never use a project's own gitmodules feature, because we can't easily control it. better to let it break first, and then figure out what modules to add manually, so that we have only what we need for each project. it's done this way, because git's own submodules feature doesn't have very good error checking in general, nor does it have good redundancy. with the current design, we can declare backup repositories for each submodule. we replicate it precisely. for example: 3rdparty/vboot this is a coreboot submodule, and we handle that in the coreboot trees. however, our current design also allows you to do this even if the upstream repository does not contain a .gitmodules file Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
860deb3e7e
commit
9825e97a83
|
@ -109,9 +109,6 @@ prep_submodules()
|
|||
if [ -f "$mdir/module.list" ]; then
|
||||
cat "$mdir/module.list" > "$tmpdir/modules" || \
|
||||
$err "!cp $mdir/module.list $tmpdir/modules"
|
||||
elif [ -f "$tmpgit/.gitmodules" ]; then
|
||||
git -C "$tmpgit" submodule status | awk '{print $2}' > \
|
||||
"$tmpdir/modules" || $err "$mdir: cannot list submodules"
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
@ -141,9 +138,6 @@ fetch_submodule()
|
|||
[ -d "$tmpgit/$1" ] && break
|
||||
done
|
||||
[ -d "$tmpgit/$1" ] || $err "!clone $mod $project $mcfgdir $1"
|
||||
else
|
||||
git -C "$tmpgit" submodule update --init -- "$1" || $err \
|
||||
"$mdir: !update $1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue