Ciprian Dorin, Craciun wrote:
    About download-agents for makepkg. (This is why I've bothered the
developers of pacman this morning with compilation issues... :))

    So I wanted to be able to make PKGBUILD and makepkg extract
sources for Git repositories. And after asking on the arch-general, I
was pointed to the following bug:
        http://bugs.archlinux.org/task/7816

    As a consequence I've started hacking and commed up with the
following patches (put at the end). (I've ended up with four pathes
from git format-patch... Should I put only the diff between maint
branch and my branch?)

    Also below is the description on the bug-tracker:

~~~~
I've made some hacking staring from pacman Git repository. My work is
available at (branch patches/git-dlagent):
http://gitorious.org/~ciprian.craciun/pacman/ciprian-craciun-patches

In summary:
* added a script: /usr/bin/git-dlagent that takes exactly two
arguments: URL and output.
* updated /etc/makepkg.conf to include the following URL's: git://,
git+file://, git+http://, git+https://, git+ssh://, git+rsync;
<snip>

Hi,

Thanks for tackling this.  There are some interesting ideas in your patch.

From my point of view, this is far too complex for inclusion into makepkg. The addition of six new download URLs to makepkg (and that is just for git and not cvs,svn,hg,...) and requiring a download script just seems overboard.

Taking a look at git PKGBUILDs on the AUR and the git prototype distributed with the Arch from the ABS package, what is really wanted is to reduce this:

--start--
_gitroot="GITURL"
_gitname="MODENAME"

build() {
 cd "$srcdir"
 msg "Connecting to GIT server...."

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

 msg "GIT checkout done or server timeout"
 msg "Starting make..."

 rm -rf "$srcdir/$_gitname-build"
 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
 cd "$srcdir/$_gitname-build"
--end--

with a "source=(git...)" line. I'm sure that you have covered some edge cases that can not be handled very easily in this fashion and I see some added functionality in your changes. However, I am not sure we need that complexity in 99% of use cases.

Your patch has pointed out some interesting issues. Especially the issue of checksums and how they are handled when the source is not a real source file.

Allan


Reply via email to