When extracting the sources for a big package (e.g. kernel) git forks a process to repack the repository "for optimum performance" (unless configured otherwise for example in ~/.gitconfig). However this is time that is not well spend when waiting for a build to complete.
So ensure that ptxdist doesn't trigger this housekeeping. As this cleanup is sensible as soon as you start modifying the git repository, suppress it only via the commandline instead of modifying the repository's configuration. Signed-off-by: Uwe Kleine-König <[email protected]> --- scripts/lib/ptxd_make_world_patchin.sh | 35 +++++++++++++++++--------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh index 606d9ebc028b..021989e27e06 100644 --- a/scripts/lib/ptxd_make_world_patchin.sh +++ b/scripts/lib/ptxd_make_world_patchin.sh @@ -45,6 +45,17 @@ ptxd_make_world_patchin_apply_init() export -f ptxd_make_world_patchin_apply_init +# +# Wrapper that prevents running automatic repack during ptxdist runs to not +# loose more time on patch stacks that maybe are not modified anyhow. +# +__git() +{ + git -c gc.auto=0 "$@" +} +export -f __git + + # # initialize git database in $pkg_patchin_dir and do initial commit # @@ -56,14 +67,14 @@ ptxd_make_world_patchin_apply_git_init() # is already git repo? if [ "${git_dir}" != ".git" ]; then echo "patchin: git: initializing repository" - git init -q && - git add -f . && - git commit -q -m "initial commit" --author="ptxdist-${PTXDIST_VERSION_FULL} <[email protected]>" && - git tag "${pkg_pkg//\~/-}" && - git tag base && - git config alias.ptx-patches "!${PTXDIST_TOPDIR}/scripts/git-ptx-patches \"\${@}\"" && - git config diff.renames false && - git config core.abbrev 12 && + __git init -q && + __git add -f . && + __git commit -q -m "initial commit" --author="ptxdist-${PTXDIST_VERSION_FULL} <[email protected]>" && + __git tag "${pkg_pkg//\~/-}" && + __git tag base && + __git config alias.ptx-patches "!${PTXDIST_TOPDIR}/scripts/git-ptx-patches \"\${@}\"" && + __git config diff.renames false && + __git config core.abbrev 12 && echo "patchin: git: done" fi } @@ -139,24 +150,24 @@ ptxd_make_world_patchin_apply_git() mv ${pkg_patchin_dir}/.ptxdist/git-patches/series{,.1} || return mv ${pkg_patchin_dir}/.ptxdist/git-patches/series{.${tag},} || return - git quiltimport \ + __git quiltimport \ --patches "${pkg_patchin_dir}/.ptxdist/git-patches" \ --author "unknown author <[email protected]>" && echo "tagging -> ${tag}" && - git tag -f ${tag} && + __git tag -f ${tag} && mv ${pkg_patchin_dir}/.ptxdist/git-patches/series{,.${tag}} || return mv ${pkg_patchin_dir}/.ptxdist/git-patches/series{.1,} || return fi done - git quiltimport \ + __git quiltimport \ --patches "${pkg_patchin_dir}/.ptxdist/git-patches" \ --author "unknown author <[email protected]>" && # skip patches generated by other tools with '# <tool>-end' as end marker if tail -n1 "${pkg_patchin_dir}/.ptxdist/series" | grep -q '# [^ ]*-end$'; then local last="$(sed -n 's/^0*\([1-9][0-9]*\)-.*/\1/p' "${pkg_patchin_dir}/.ptxdist/series" | tail -n1)" - git tag -f base || return + __git tag -f base || return local next=1000 if [ -n "${last}" ]; then next="$[(1+${last}/1000)*1000]" -- 2.20.1 _______________________________________________ ptxdist mailing list [email protected]
