GNU bug report logs -
#51307
[PATCH 0/2] guix hash: eases conversion
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Wed, 20 Oct 2021 16:51:01 UTC
Severity: normal
Tags: patch
Done: zimoun <zimon.toutoune <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi Ludo,
On Sun, 31 Oct 2021 at 15:48, Ludovic Courtès <ludo <at> gnu.org> wrote:
> Thinking more about it, I think confusion stems from the term
> “recursive” (inherited from Nix) because, as you write, it doesn’t
> necessarily have to do with recursion and directory traversal.
>
> Instead, it has to do with the serialization method.
>
> Thus, probably, ‘--recursive’ could be replaced by a ‘-S’ flag:
>
> guix hash -S nar something
>
> or:
>
> guix hash -S none something
> guix hash -S git something
> guix hash -S swh something
>
> ‘-S none’ would be like not passing ‘-r’; ‘-S git’ would serialize the
> file/directory as a Git tree; ‘-S swh’ would serialize it the SWH way,
> which is like Git except it preserves empty directories (Disarchive
> implements the Git/SWH methods already.)
Well, v2 is an attempt for this UI. It does not solve my initial
problem but it is a first step in that direction. ;-)
Note that SWH serializer is not added. Because I have probably missed
to reach the implementation. :-)
Well, next step could be to add an option “--list-serializers“. Let
as an exercise for the reader. ;-)
> As mentioned towards the end of
> <https://guix.gnu.org/en/blog/2019/connecting-reproducible-deployment-to-a-long-term-source-code-archive/>,
> being able to deal with different tree serialization methods would be
> useful going forward; for instance, if we had the option to store
> SWH-style content hashes for origins, that’d help a lot. Allowing ‘guix
> hash’ to deal with that is a first step in that direction.
Well, this series does not add SWH-style but it is a tiny step in that
direction. Somehow, after v2-patch#2, it is easy to add as many
serializers as we want. :-)
> (Apologies for slipping a bit off-topic…)
Thanks for slipping off-topic. :-)
Cheers,
simon
*serializer: it is not an English word but I lacked imagination.
This bug report was last modified 3 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.