[Nix-dev] nix-prefetch-git & TopGit
Ludovic Courtès
ludo at gnu.org
Wed Mar 16 16:04:16 CET 2011
Hi Marc,
Thanks for your review!
Marc Weber <marco-oweber at gmx.de> writes:
> Modified: nixpkgs/trunk/pkgs/build-support/fetchgit/nix-prefetch-git
> ==============================================================================
> --- nixpkgs/trunk/pkgs/build-support/fetchgit/nix-prefetch-git Mon Mar 14 21:13:35 2011 (r26304)
> +++ nixpkgs/trunk/pkgs/build-support/fetchgit/nix-prefetch-git Mon Mar 14 22:00:20 2011 (r26305)
> @@ -120,6 +120,17 @@
> # Checkout linked sources.
> init_submodules;
>
> + if [ -f .topdeps ]; then
> + if tg help 2>&1 > /dev/null
> + then
> + echo "populating TopGit branches..."
> + tg remote --populate origin
> + else
> + echo "WARNING: would populate TopGit branches but TopGit is not available" >&2
> + echo "WARNING: install TopGit to fix the problem" >&2
> + fi
> + fi
> +
> cd $top;
> }
>
> I've trouble with the wording "problem".
>
> The topic branches are fetched as remotes anyway.
Hmm, I don’t think so.
Again, as discussed in the other thread, my use case is this:
http://www.bddebian.com:8888/~hurd-web/source_repositories/glibc/
I swear that ‘tg remote --populate’ /must/ be performed, otherwise you
can run any ‘tg’ command.
> So not using top-git is not a "problem".
Agreed, that’s why the script prints a warning instead of bailing out.
> The real question is: should nix-prefetch-git populate local branches
> for all remote branches automatically?
> It looks to me like you tried doing that.
Yes. Admittedly, turning nix-prefetch-git into a kitchen sink (like I
did) isn’t ideal. However, I can’t think of any other way for my use
case (hence my call for suggestions in <87wrk7apf8.fsf at gnu.org>.)
> Your comments suggest that you should install top-git because otherwise
> something doesn't work which is not the case.
What wording would you suggest?
Thanks,
Ludo’.
More information about the nix-dev
mailing list