Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-07-15 23:57:25 +1000
committerAllan McRae <allan@archlinux.org>2012-08-04 00:16:38 +1000
commit7fd56118d0a751f0e488ada38101390e840bd311 (patch)
tree8138d82cce2cfdd479c4175bdbaa8eec34cc0614 /scripts/makepkg.sh.in
parentb3e82ec59e31e904b96a0d0c504af1549c8b2115 (diff)
makepkg: do not download VCS sources unless needed
VCS sources are not needed for --geninteg or --source operations. This also prevents VCS downloads outputting to stdout, which prevented piping -g output to the PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index aa234577..aec44876 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -513,6 +513,11 @@ download_svn() {
download_sources() {
msg "$(gettext "Retrieving Sources...")"
+ local GET_VCS=1
+ if [[ $1 == "fast" ]]; then
+ GET_VCS=0
+ fi
+
pushd "$SRCDEST" &>/dev/null
local netfile
@@ -527,10 +532,10 @@ download_sources() {
download_file "$netfile"
;;
git*)
- download_git "$netfile"
+ (( GET_VCS )) && download_git "$netfile"
;;
svn*)
- download_svn "$netfile"
+ (( GET_VCS )) && download_svn "$netfile"
;;
*)
error "$(gettext "Unknown download protocol: %s")" "$proto"
@@ -2382,7 +2387,7 @@ if (( GENINTEG )); then
mkdir -p "$srcdir"
chmod a-s "$srcdir"
cd_safe "$srcdir"
- download_sources
+ download_sources fast
generate_checksums
exit 0 # $E_OK
fi
@@ -2527,10 +2532,11 @@ if (( SOURCEONLY )); then
mkdir -p "$srcdir"
chmod a-s "$srcdir"
cd_safe "$srcdir"
- if ( (( ! SKIPCHECKSUMS )) || \
- ( (( ! SKIPPGPCHECK )) && source_has_signatures ) ) || \
- (( SOURCEONLY == 2 )); then
+ if (( SOURCEONLY == 2 )); then
download_sources
+ elif ( (( ! SKIPCHECKSUMS )) || \
+ ( (( ! SKIPPGPCHECK )) && source_has_signatures ) ); then
+ download_sources fast
fi
check_source_integrity
cd_safe "$startdir"