[Nix-dev] nix-prefetch-git in nixpkgs

Kirill Elagin kirelagin at gmail.com
Fri Jun 8 12:13:18 CEST 2012


2012/6/8 Nicolas Pierron <nicolas.b.pierron at gmail.com>

> Hi,
>
> On Thu, Jun 7, 2012 at 7:06 AM, Kirill Elagin <kirelagin at gmail.com> wrote:
> > I'm reading nix-prefetch-git from HEAD right now and its behaviour seems
> to
> > be consistent with documentation except for a small bug that renders
> those
> > --* setters a bit unusable (see this).
>
> What you call the old syntax is currently the most used.  I would be
> quite happy to remove it, but this will change a lot of hashes.
> I don't understand, the for loop should still iterate over the
> arguments, unless bash is removing them from the list of argument
> because they are directly used.


I didn't say it's old syntax. I said it's old way of accepting that syntax.
The new for-loop approach also handles this way of specifying url and rev
as positional args without --* setters.

I probably should explain what was going on.
Note that when you call `./nix-prefetch-git --url git://
gitorious.org/qt-labs/jom.git --rev HEAD`,
$3 is "--rev", and due to those lines that I modified in the first patch,
$expHash becomes "--rev".
Since there is no `--hash` option, $expHash is not overwritten later and
that's why call to nix-store fails.

Again, this patch won't break `./nix-prefetch-git git://
gitorious.org/qt-labs/jom.git HEAD` call.

--
Кирилл Елагин
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120608/576f8f78/attachment.html 


More information about the nix-dev mailing list