[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] substitute: Improve readability of substitute-related output
Re: [PATCH] substitute: Improve readability of substitute-related output.
Wed, 16 Sep 2015 23:54:44 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Steve Sprang <address@hidden> skribis:
> From c8a04ac71e347de49a2795c4ef503a5abac2f882 Mon Sep 17 00:00:00 2001
> From: Steve Sprang <address@hidden>
> Date: Mon, 14 Sep 2015 22:31:11 -0700
> Subject: [PATCH] substitute: Improve readability of substitute-related output.
> * guix/build/download.scm
> (string-pad-middle, store-url-abbreviation): New procedures.
> (progress-proc): Generate a better indeterminate progress string.
> * guix/store.scm (truncated-store-path): New procedure.
> * guix/scripts/substitute.scm (assert-valid-narinfo): Add newlines to output.
> (process-substitution): Use byte-count->string and truncated-store-path.
I applied the patch and then noticed a couple of issues, which led me to
adjust a few things:
• (guix store) must not be used in (guix build download), so I move
‘truncated-store-path’ there, renamed it to
‘store-path-abbreviation’, and implemented it differently.
• ‘progress-proc’ must not use ‘store-url-abbreviation’
unconditionally because it’s also used when downloading unrelated
URLs. So I added an #:abbreviation parameter, which
‘process-substitution’ sets to ‘store-url-abbreviation’.
• ‘string-pad-middle’ had funky indentation.
Pushed as a8be7b9, thanks!