Re: mk/git-package.mk and "--depth 1"

[email protected] (Eric Schnoebelen)
Newsgroups gmane.os.netbsd.devel.pkgsrc.wip.general
Message-ID <[email protected]>
Greg Troxel writes:
-   Due to option "--depth 1" some packages based on git-package.mk
-   fail to build like this
- 
-       fatal: dumb http transport does not support --depth
- 
-   Can I commit the following?
- 
-   Index: mk/git-package.mk
-   ===================================================================
-   RCS file: /cvsroot/pkgsrc-wip/wip/mk/git-package.mk,v
-   retrieving revision 1.2
-   diff -u -r1.2 git-package.mk
-   --- mk/git-package.mk   3 Mar 2010 05:06:26 -0000       1.2
-   +++ mk/git-package.mk   7 Mar 2010 12:49:58 -0000
-   @@ -55,7 +55,7 @@
- 
-    _GIT_CMD=              git
-    _GIT_ENV=              # empty
-   -_GIT_FLAGS=            --quiet --depth 1
-   +_GIT_FLAGS=            --quiet
-    _GIT_PKGVERSION_CMD=   ${DATE} -u +'%Y.%m.%d'
-    _GIT_PKGVERSION=       ${_GIT_PKGVERSION_CMD:sh}
- 
- I am not a git black belt, but I believe '--depth 1' is intended to
- avoid copying lots of unnecessary stuff.  So I wonder if it's a bug in
- git that some packages flame out, and if there should be some specific
- workaround for them instead of always fetching everything.

Yes, that was the intent.

I suppose the _GIT_FLAGS variable could have the '--depth 1'
conditionally removed if the service URL is 'http://.*' instead
of 'git://.*'.

But, given that clone wants to slurp the entire repository in
the absence of '--depth', I believe it is a good idea to limit
the amount of data brought onto the builders systme.

--
Eric Schnoebelen	[email protected]			http://www.cirr.com
	"...Microsoft is to software what Miller (and the other big
	American brewers) are to beer." -- Mark Bartelt in comp.sys.dec

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.