--- makepkg 2013-06-18 06:01:45.000000000 +0200 +++ /usr/bin/makepkg 2013-09-23 11:11:55.616227533 +0200 @@ -82,6 +82,7 @@ CHECKFUNC=0 PKGFUNC=0 PKGVERFUNC=0 SPLITPKG=0 +VCSINCREMENTAL=0 PKGLIST=() SIGNPKG='' @@ -578,12 +579,20 @@ extract_git() { msg2 "$(gettext "Creating working copy of %s %s repo...")" "${repo}" "git" pushd "$srcdir" &>/dev/null - rm -rf "${dir##*/}" - if ! git clone "$dir"; then - error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git" - plain "$(gettext "Aborting...")" - exit 1 + if [[ VCSINCREMENTAL -ne 0 && -d "${dir##*/}" ]]; then + pushd `pwd` &>/dev/null + cd_safe "${dir##*/}" + git pull + popd &>/dev/null + else + rm -rf "${dir##*/}" + + if ! git clone "$dir"; then + error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git" + plain "$(gettext "Aborting...")" + exit 1 + fi fi cd_safe "${dir##*/}" @@ -605,7 +614,7 @@ extract_git() { fi if [[ -n $ref ]]; then - if ! git checkout -b makepkg $ref; then + if ! git checkout -B makepkg $ref; then error "$(gettext "Failure while creating working copy of %s %s repo")" "${repo}" "git" plain "$(gettext "Aborting...")" exit 1 @@ -2645,6 +2654,7 @@ usage() { printf -- "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" printf -- "$(gettext " --config Use an alternate config file (instead of '%s')")\n" "$confdir/makepkg.conf" printf -- "$(gettext " --holdver Do not update VCS sources")\n" + printf -- "$(gettext " --incremental Incremental build with VCS sources (only updates build dir)")\n" printf -- "$(gettext " --key Specify a key to use for %s signing instead of the default")\n" "gpg" printf -- "$(gettext " --nocheck Do not run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" printf -- "$(gettext " --nosign Do not create a signature for the package")\n" @@ -2688,7 +2698,7 @@ ARGLIST=("$@") # Parse Command Line Options. OPT_SHORT="AcdefFghiLmop:rRsSV" OPT_LONG=('allsource' 'asroot' 'check' 'clean' 'config:' 'force' 'geninteg' - 'help' 'holdver' 'ignorearch' 'install' 'key:' 'log' 'nobuild' 'nocolor' + 'help' 'holdver' 'incremental' 'ignorearch' 'install' 'key:' 'log' 'nobuild' 'nocolor' 'nocheck' 'nodeps' 'noextract' 'nosign' 'pkg:' 'repackage' 'rmdeps' 'sign' 'skipchecksums' 'skipinteg' 'skippgpcheck' 'source' 'syncdeps' 'verifysource' 'version') @@ -2723,6 +2733,7 @@ while true; do -F) INFAKEROOT=1 ;; -g|--geninteg) GENINTEG=1 ;; --holdver) HOLDVER=1 ;; + --incremental) VCSINCREMENTAL=1 ;; -i|--install) INSTALL=1 ;; --key) shift; GPGKEY=$1 ;; -L|--log) LOGGING=1 ;;