From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 34249-done@debbugs.gnu.org, 33470-done@debbugs.gnu.org
Subject: bug#33470: [bug#34249] [PATCH] guix package: Avoid spinner at end of output.
Date: Wed, 06 Feb 2019 13:16:23 +0000 [thread overview]
Message-ID: <87o97p5a6w.fsf@cbaines.net> (raw)
In-Reply-To: <8736pbm6ac.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]
Ludovic Courtès <ludo@gnu.org> writes:
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
>> Hi Christopher,
>>> diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
>>> index a633d2ee6d..4db0e72e9b 100644
>>> --- a/guix/scripts/package.scm
>>> +++ b/guix/scripts/package.scm
>>> @@ -159,6 +159,7 @@ hooks\" run when building the profile."
>>> (switch-symlinks profile (basename name))
>>> (unless (string=? profile %current-profile)
>>> (register-gc-root store name))
>>> + (display "\r") ; erase the spinner
>>
>> In order to actually erase it, might want to do (display "\r\x1b[K") instead.
>
> And to do that, you can use (erase-current-line port).
>
> Though actually I think this should be done in ‘print-build-event’ in
> (guix status). Probably something like the patch below, but I haven’t
> been able to quickly reproduce the initial problem.
>
> Could you give it a spin (ah ha!) and report back?
>
> If it doesn’t solve the issue, we should strace the thing to see why it
> keeps spinning after everything is “done” basically.
>
> Thanks,
> Ludo’.
>
> diff --git a/guix/status.scm b/guix/status.scm
> index e3375816c5..7a330525b0 100644
> --- a/guix/status.scm
> +++ b/guix/status.scm
> @@ -465,8 +465,14 @@ addition to build events."
> (_
> (spin! port))))))
>
> - (unless print-log?
> - (display "\r" port)) ;erase the spinner
> + (define erase-current-line*
> + (if (isatty?* port)
> + (lambda (port)
> + (erase-current-line port)
> + (force-output port))
> + (const #t)))
> +
> + (erase-current-line* port) ;clear the spinner
> (match event
> (('build-started drv . _)
> (let ((properties (derivation-properties
I've tried out the change you pushed here [1], and it looks good to me
:) I can't see anything odd in the output now.
1: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=7473bce207af846312d5167a398f5f20bbf3e896
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
next prev parent reply other threads:[~2019-02-06 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190129195031.21496-1-mail@cbaines.net>
[not found] ` <20190129211645.08cdbd2d@scratchpost.org>
2019-01-29 22:46 ` bug#33470: [bug#34249] [PATCH] guix package: Avoid spinner at end of output Ludovic Courtès
2019-02-06 13:16 ` Christopher Baines [this message]
2019-02-06 14:32 ` bug#33470: bug#34249: " Ricardo Wurmus
2019-02-07 16:09 ` Ludovic Courtès
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=87o97p5a6w.fsf@cbaines.net \
--to=mail@cbaines.net \
--cc=33470-done@debbugs.gnu.org \
--cc=34249-done@debbugs.gnu.org \
--cc=ludo@gnu.org \
/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).