unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Steve Sprang <steve.sprang@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] substitute: Improve readability of substitute-related output.
Date: Wed, 16 Sep 2015 23:54:44 +0200	[thread overview]
Message-ID: <8737yeav2z.fsf@gnu.org> (raw)
In-Reply-To: <CA+xn8YBBNvinYhMP0Nb22Qkt0iq=obDF-4KCgE0dSLf-K6dbqw@mail.gmail.com> (Steve Sprang's message of "Tue, 15 Sep 2015 22:00:06 -0700")

Steve Sprang <steve.sprang@gmail.com> skribis:

> From c8a04ac71e347de49a2795c4ef503a5abac2f882 Mon Sep 17 00:00:00 2001
> From: Steve Sprang <scs@stevesprang.com>
> 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!

Ludo’.

      reply	other threads:[~2015-09-16 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15  5:55 [PATCH] substitute: Improve readability of substitute-related output Steve Sprang
2015-09-15  8:22 ` Ludovic Courtès
2015-09-16  5:00   ` Steve Sprang
2015-09-16 21:54     ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737yeav2z.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=steve.sprang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).