From: Richard Sent <richard@freakingpenguin.com>
To: 71299@debbugs.gnu.org
Subject: bug#71299: Investigation
Date: Sat, 01 Jun 2024 14:39:55 -0400 [thread overview]
Message-ID: <87a5k48q2s.fsf@freakingpenguin.com> (raw)
In-Reply-To: <87ikyt8wfr.fsf@freakingpenguin.com>
Hi Guix!
I started looking into this problem and unfortunately it looks like it
might be more complicated than I thought.
My initial thought was having two progress-reporters and selecting on
based on a simple conditional if current-error-port was a tty or not.
This would be in guix/scripts/substitute. Unfortunately, this might be a
bit more challenging.
Unlike the other scripts, guix/scripts/substitute is invoked by the
daemon directly. Furthermore, it isn't passed a file descriptor to the
invokers stderr. Instead, it goes through the build daemon. See
nix/libstore/local-store.cc:LocalStore::getLineFromSubstituter.
From my testing calling istty? on that error port always returns #f,
ergo the "simple" progress-reporter is always used and we lose the
interactive progress bars.
Testing this is also a pain as well because it involves changing the
build daemon. In my experience the easiest way is:
1. Change the commit field for the guix package in
package-management.scm to the commit you want to check
2. Update the url field for the guix package to
"file:///path/to/guix/clone"
3. Forcefully disable authentication in guix/build-system/channel.scm
4. Generate an installer image via $ ./pre-inst-env guix system image
gnu/system/install.scm --image-type=iso9660, then boot from that image
and observe the output.
So, that leaves two options that I can see:
1. The daemon stops capturing stderr from the substituter and merely
passes it the daemon's stderr.
1. Challenging to get right and this may have unforseen consequences.
Two processes writing freely to the same output at once is a bad idea.
2. The daemon has a isatty? check and sets a flag for the build agent
which is passed along to scripts/substitute.
--
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.
next prev parent reply other threads:[~2024-06-01 18:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 22:10 bug#71299: Better handle "updating substitutes" messages in CI pipelines and dumb terminals Richard Sent
2024-06-01 18:39 ` Richard Sent [this message]
2024-06-01 19:06 ` bug#71299: Fixed link for demonstration of the problem Richard Sent
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5k48q2s.fsf@freakingpenguin.com \
--to=richard@freakingpenguin.com \
--cc=71299@debbugs.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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.