|
From: | Caleb Ristvedt |
Subject: | Re: [PATCH] Prototype register-path |
Date: | Tue, 06 Jun 2017 03:59:31 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
address@hidden (Ludovic Courtès) writes: > Hi reepca! > > I gave this patch set a try and looked at the code, and it looks very > good to me! > > “make check TESTS=tests/store.scm” passes now with the fixes you posted > today (‘getenv’ & co.) I end up with 2 failed tests, but neither of them are the register-path one. > For deduplication, you already know the (guix hash) API that will allow > you to do that I guess. The “deduplication database” is simply the > /gnu/store/.links directory. Each entry there is a hard link to a file; > the name of the entry is the hex representation of the sha256 hash of > that file. So when inserting a file in the store, all you need is to > look up its hash in /gnu/store/.links and hard-link from there. See > what I mean? And if it isn't in /gnu/store/.links, put a hardlink there? Also, when you say "when inserting a file", what do you mean by that? I was under the impression that the paths given to register-path were already in the store but simply weren't in the database or otherwise "officially" in the store. Is my assumption incorrect? Less on-topic, I don't really know how sha256 works, but if it is a hashing function, there must be a possibility (albeit small) of collisions, right? Is it worth developing a strategy for handling them? > Some minor suggestions about the code: Implemented all of these except maybe half of the commit log one... I'm not sure what the commit message headline should be, so I sort of guessed based on some of the ones in recent history, and I'm not sure I've got the formatting quite right yet, but it should be a lot closer. > What about pushing your changes to a WIP branch on Savannah or > elsewhere? (If you have an account on Savannah we can give you access.) I just made an account today as "reepca". Should I submit a "request for inclusion"? In the meantime, here's a much less fixup-riddled patch set that I think is just about feature-complete as far as register-path is concerned:
0001-guix-register-path-Implement-prototype-in-scheme.patch
Description: Text Data
0002-guix-register-path-Honor-environment-variables.patch
Description: Text Data
0003-.dir-locals.el-properly-indent-sql-macros.patch
Description: Text Data
0004-guix-sql.scm-split-into-generic-and-store-specific-p.patch
Description: Text Data
0005-guix-register-path-use-new-store-database-directory.patch
Description: Text Data
0006-guix-register-path-reset-timestamps-after-registerin.patch
Description: Text Data
0007-guix-register-path-do-deduplication.patch
Description: Text Data
> Thank you, and thumbs up for the quality work so far! > > Ludo’. Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |