FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 07-15-2012, 02:00 PM
Allan McRae
 
Default 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>
---
scripts/makepkg.sh.in | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 93587b3..8ab621a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -511,6 +511,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
@@ -525,10 +530,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"
@@ -2377,7 +2382,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
@@ -2519,10 +2524,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"
--
1.7.11.2
 

Thread Tools




All times are GMT. The time now is 06:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org