[aur-general] Git sparse checkouts
sausageandeggs at archlinux.us
Wed Dec 21 15:07:42 EST 2011
The day was 21/12/11 18:21 when , Matthew Monaco had this to say......:
> On 12/21/2011 02:02 AM, Dan Vrátil wrote:
>> On Wed, 21 Dec 2011 03:37:53 +0000, Simon Stoakley
>> <sausageandeggs at archlinux.us> wrote:
>>> Hi All,
>>> I'm uploading a pkg for an mpris2 plugin for Kupfer. I don't want to
>>> clone the whole git repo (seems wasteful and I think half the code
>>> there is dead) and the only part that I'm interested in is the mpris2
>>> folder. The only way I've found of checking out part of a repo in is
>>> to use the sparse checkout trick.
>>> The question I have is whether or not it's OK to use this in a
>>> PKGBUILD or not, what say ye wise men?!
>>> PKGBUILD below for reference (depends on pkgs I haven't uploaded
>>> yet if you try building)
>> I don't think git allows you to clone just part of a repo (unlike SVN),
>> but what I
>> usually do is to reduce the clone depth: git clone git://url.com/repo
>> --depth 1
>> The --depth switch will make git to clone only the most recent history,
>> because when
>> compiling, you are hardly interested in previous commits. It usually
>> makes the clone
>> operation significantly faster and saves a lot of bandwidth.
> If the PKGBUILD is supposed to be for some specific release of this
> package, and it's only available through git, then you need to find a
> mirror that allows for git archive (even if they only allow tarring with
> no compression). Because with git clone --depth you can only get the
> latest. However, if it's a traditional -git package then --depth should
> work fine.
I think I'm just going to grab the code , put it in my own git repo and
grab it from there, can't find any sort of license though so I'm going
to email the author. Does anyone know what the usual procedure is if the
code is unlicensed?
More information about the aur-general