You are not logged in.

#1 2013-11-11 16:23:49

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Proper PKGBUILD syntax for git clones/pulls with --depth 1

I know I can do a manual git snapshot, and host that file externally, but I am wondering if makepkg can clone a git repo with the '--depth 1'  switch somehow.  Under the old syntax, (i.e not using source='git://foo/bar'), this was possible hard-coded into the PKGBUILD itself:

build() {
	msg "Connecting to GIT server...."

	if [ -d $_gitname ] ; then
		cd $_gitname && git pull --depth=1 origin
		msg "The local files are updated."
	else
		git clone --depth=1 $_gitroot
		cd $_gitname
	fi
}

Is this possible while defining source='git://foo/bar' at all?  Is my work around sane?

Last edited by graysky (2013-11-11 16:26:27)

Offline

#2 2013-11-11 16:54:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Proper PKGBUILD syntax for git clones/pulls with --depth 1

This was discussed on one of the mailing lists a few months back (when the awesome pacman 4.1 features arrived).

Here is part of it, but I recall it being a long thread, and I'm not sure where and when in the midst of things that a true answer was given (if any).  So that link is just a totally random point in the discussion (first search engine hit).

Offline

Board footer

Powered by FluxBB