Re: [aur-general] Git sparse checkouts

2011-12-21 Thread Dan Vrátil
On Wed, 21 Dec 2011 03:37:53 +, Simon Stoakley
sausageande...@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)
 
 Thanks
 Simon

Hi,

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.

Cheers,
Dan

-- 

Dan Vrátil
d...@progdan.cz
Tel.: +420 732 326 870
Jabber: prog...@jabber.cz


Re: [aur-general] Git sparse checkouts

2011-12-21 Thread Matthew Monaco

On 12/21/2011 02:02 AM, Dan Vrátil wrote:

On Wed, 21 Dec 2011 03:37:53 +, Simon Stoakley
sausageande...@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)

Thanks
Simon


Hi,

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.

Cheers,
Dan




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.


Re: [aur-general] Git sparse checkouts

2011-12-21 Thread full-engl...@live.co.uk

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 +, Simon Stoakley
sausageande...@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)

Thanks
Simon


Hi,

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.

Cheers,
Dan




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?


--


Re: [aur-general] Git sparse checkouts

2011-12-21 Thread Peter Lewis
On Wednesday 21 Dec 2011 20:07:42 full-engl...@live.co.uk wrote:
 Does anyone know what the usual procedure is if the code is unlicensed?

This will almost certainly vary by jurisdiction. In England and Wales at least 
(as far as I understand it) no code is unlicensed - copyright is automatic 
and there is just an implicit default licence which is restrictive (i.e. you 
can't copy it). This is why you should always stick a licence on your code, 
especially if you don't care who uses it ;-)

Contacting the author is the best way to go.

HTH,

Pete.


[aur-general] Git sparse checkouts

2011-12-20 Thread Simon Stoakley

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)


Thanks
Simon
--
# Contributor: sausageandeggs sausageande...@archlinux.us

pkgname=kupfer-mpris2-plugin
pkgver=20111221
pkgrel=1
pkgdesc=Control mpris compatable media players from Kupfer
arch=(any)
url=https://github.com/hugosenari/Kupfer-Plugins;
license=('GPL')
depends=('mpris2-git')
makedepends=('git')

_gitroot=git://github.com/hugosenari/Kupfer-Plugins
_gitname=Kupfer-Plugins

build() {
  cd ${srcdir}

  msg Connecting to GIT server...

  if [ -d ${_gitname} ] ; then
cd ${_gitname}  git pull ${_gitname} master
msg The local files are updated.
  else
mkdir ${_gitname}
cd ${_gitname}
git init
git remote add ${_gitname} ${_gitroot}
git config core.sparsecheckout true
echo mpris2-player  .git/info/sparse-checkout
git pull ${_gitname} master
  fi
  msg GIT checkout done or server timeout
}

package(){
  cd ${srcdir}/${_gitname}
  install -d ${pkgdir}/usr/share/kupfer/kupfer/plugin
  install mpris2-player/* ${pkgdir}/usr/share/kupfer/kupfer/plugin/
} 



Re: [aur-general] Git sparse checkouts

2011-12-20 Thread Jan Steffens
On Wed, Dec 21, 2011 at 4:37 AM, Simon Stoakley
sausageande...@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)

 Thanks
 Simon
 --

 # Contributor: sausageandeggs sausageande...@archlinux.us

 pkgname=kupfer-mpris2-plugin
 pkgver=20111221
 pkgrel=1
 pkgdesc=Control mpris compatable media players from Kupfer
 arch=(any)
 url=https://github.com/hugosenari/Kupfer-Plugins;
 license=('GPL')
 depends=('mpris2-git')
 makedepends=('git')

 _gitroot=git://github.com/hugosenari/Kupfer-Plugins
 _gitname=Kupfer-Plugins

 build() {
  cd ${srcdir}

  msg Connecting to GIT server...

  if [ -d ${_gitname} ] ; then
    cd ${_gitname}  git pull ${_gitname} master
    msg The local files are updated.
  else
    mkdir ${_gitname}
    cd ${_gitname}
    git init
    git remote add ${_gitname} ${_gitroot}
    git config core.sparsecheckout true
    echo mpris2-player  .git/info/sparse-checkout
    git pull ${_gitname} master
  fi
  msg GIT checkout done or server timeout
 }

 package(){
  cd ${srcdir}/${_gitname}
  install -d ${pkgdir}/usr/share/kupfer/kupfer/plugin
  install mpris2-player/* ${pkgdir}/usr/share/kupfer/kupfer/plugin/
 }



AFAIK this will still clone the whole repository. The only difference
is that it will populate only part of the working directory. So you're
only saving on some local decompression, not on transfer volume.