[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best practise between git-fetch vs url-fetch?

From: Brice Waegeneire
Subject: Re: best practise between git-fetch vs url-fetch?
Date: Wed, 13 May 2020 08:24:15 +0000
User-agent: Roundcube Webmail/1.3.8


On 2020-05-13 01:08, zimoun wrote:
Based on these 2 messages [1,2], what is the consensus between
git-fetch and url-fetch?

I was hoping that some one bring this up, thanks.

Pushing to SWH when linting appears to me winning the pros/cons.  Even
if SWH should eventually fetch soon.
And the other big pros from my point of view is the content-addressed
Git references.

Git references being content-addressed is important because it
make it more difficult for a lazy upstream developer to replace a
tarball in place -because it was somehow broken and they didn't
wanted to bump the version number- and broke a package.  Instead
with git, to broke a package in similar way (with a hash mismatch)
that developer would have to do “git push --force” which is much
more frowned upon since it will affect all the users of that git repo.

An other argument in recommending the 'git-fetch' method is that it
facilitate the use of “guix build --with-commit”:
1. You don't need to find out the git-url of the package,
2. Nor finding which dependencies are missing compared to a tarball
   build (often it's autoconf, libtool, & co.),
3. You don't need to manually tweak phases relating to autoconf and
   the like.
All in all recommending 'git-fetch' make “--with-commit” really more
useful.  This feature is one of my favorite from Guix since it make
testing a patch from an upstream developer really easy, eg.:
“guix build picom --with-commit=picom=vNext”.

Well, does it make sense to state on a recommended method?

It does, it avoid having to discuss it with each new contributor
and avoid noise in patches about changing the source's method based
on each developer preference (I'm personally guilty of that).

On Fri, 6 Mar 2020 at 18:41, Marius Bakke <address@hidden> wrote:

url-fetch requires less bandwidth, and does not depend on 'git'.

Though the most important distinction is that uploaded releases
sometimes contain pre-processed sources (e.g. documentation) that need
additional dependencies or scripts when building from the raw repository (this is why you often need to add autoconf, libtool & friends as inputs
when building Autotools projects from git).

I don't know whether there is a difference between the uploaded fmt
zipball and the git repository.

On Wed, 11 Mar 2020 at 15:39, Ludovic Courtès <address@hidden> wrote:

Other considerations:

  - Bandwidth requirement for source code downloads has never been a
    criterion so far.

- Git references are nice because they’re (roughly) content-addressed.

  - ‘guix lint -c archival’ archives Git references on Software
    Heritage; it does not archive tarballs (though SWH will do it
    for us eventually.)

- Brice

reply via email to

[Prev in Thread] Current Thread [Next in Thread]