On Wed, Feb 10, 2021 at 02:36:57PM +0800, Liu Shaofei wrote:
the param "--norevisedomain" indicates that all of submodules will not be changed domian name, and downloaded from remote end.
spell: domian => domain
Signed-off-by: Liu Shaofei 370072077@qq.com
sbin/makepkg | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/sbin/makepkg b/sbin/makepkg index 7a92ea71b..41e19a513 100755 --- a/sbin/makepkg +++ b/sbin/makepkg @@ -89,6 +89,7 @@ SIGNPKG='' SPLITPKG=0 SOURCEONLY=0 VERIFYSOURCE=0 +NOREVISEDOMAIN=0
You are adding an option to makepkg. To keep compatibility, if the option is not given, it should do nothing.
So I suggest change it to
REWRITEGITSERVER=0
And use option name
rewritegitserver
Thanks, Fengguang
# Forces the pkgver of the current PKGBUILD. Used by the fakeroot call # when dealing with svn/cvs/etc PKGBUILDs. @@ -587,6 +588,16 @@ download_git() { fi }
+# modify submodules address to local server address. +# (( NOREVISEDOMAIN )) is true, not replace submodules domain, and download it from remote end. +modify_gitmodules() {
- (( NOREVISEDOMAIN )) && return
- if [[ -f ".gitmodules" ]] && [[ -n ${GIT_SERVER} ]]; then
git config --system url."git://${GIT_SERVER}/".insteadOf https://
- fi
+}
extract_git() { local netfile=$1
@@ -623,10 +634,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
@@ -3462,7 +3470,7 @@ OPT_LONG=('allsource' 'check' 'clean' 'cleanbuild' 'config:' 'force' 'geninteg' 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'noarchive' 'nobuild' 'nocolor' 'nocheck' 'nodeps' 'noextract' 'noprepare' 'nosign' 'pkg:' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps'
'verifysource' 'version')
'verifysource' 'version' 'norevisedomain')
# Pacman Options OPT_LONG+=('asdeps' 'noconfirm' 'needed' 'noprogressbar') @@ -3514,6 +3522,7 @@ while true; do -s|--syncdeps) DEP_BIN=1 ;; -S|--source) SOURCEONLY=1 ;; --verifysource) VERIFYSOURCE=1 ;;
--norevisedomain) NOREVISEDOMAIN=1 ;;
-h|--help) usage; exit 0 ;; # E_OK -V|--version) version; exit 0 ;; # E_OK
-- 2.23.0