unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	66499@debbugs.gnu.org, "Clément Lassieur" <clement@lassieur.org>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Christopher Baines" <guix@cbaines.net>
Subject: [bug#66499] [PATCH] ui: Handle EPIPE errors when displaying Guix version.
Date: Mon, 16 Oct 2023 19:04:53 +0200	[thread overview]
Message-ID: <877cnmqz0q.fsf@gmail.com> (raw)
In-Reply-To: <8734ydfwq2.fsf@gnu.org>

Hi Mathieu,

On Sat, 14 Oct 2023 at 10:13, Mathieu Othacehe <othacehe@gnu.org> wrote:

> This fixes this very issue for me too. However, all the following
> commands are still failing:
>
> guix package --help|head -1
> guix package --version|head -1
> guix pull --version|head -1
> guix pull --help|head -1

Thanks.  Fixed and the remaining others too.

> and basically all the commands using show-version-and-exit. Do you need
> a more systemic approach?

Well, I do not think we can do really better than add leave-on-EPIPE
here or there.

Maybe we could have some “define-show-help” that wraps ’show-help’
definition with leave-on-EPIPE but the effort (find-replace) is not
worth some quick additions here or there, IMHO.

Well, the first patch fixes --version for all subcommands.  All the
others deal with --help.  Now, no backtraces.

--8<---------------cut here---------------start------------->8---
$ for cmd in $(find guix/scripts -name "*.scm" -type f -exec basename {} .scm \; | sort); do ./pre-inst-env guix $cmd --version | head -1 ;done
guix archive (GNU Guix) UNKNOWN
guix authenticate (GNU Guix) UNKNOWN
guix authenticate (GNU Guix) UNKNOWN
guix build (GNU Guix) UNKNOWN
guix challenge (GNU Guix) UNKNOWN
guix container (GNU Guix) UNKNOWN
guix copy (GNU Guix) UNKNOWN
guix: cpan: command not found
Try `guix --help' for more information.
guix: cran: command not found
Try `guix --help' for more information.
guix: crate: command not found
Try `guix --help' for more information.
guix deploy (GNU Guix) UNKNOWN
guix describe (GNU Guix) UNKNOWN
guix discover (GNU Guix) UNKNOWN
guix download (GNU Guix) UNKNOWN
guix edit (GNU Guix) UNKNOWN
guix edit (GNU Guix) UNKNOWN
guix edit (GNU Guix) UNKNOWN
guix: egg: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix: elm: command not found
Try `guix --help' for more information.
guix: elpa: command not found
Try `guix --help' for more information.
guix environment (GNU Guix) UNKNOWN
guix: exec: command not found
Try `guix --help' for more information.
guix gc (GNU Guix) UNKNOWN
guix: gem: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix git (GNU Guix) UNKNOWN
guix: gnu: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix: go: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix graph (GNU Guix) UNKNOWN
guix: hackage: command not found
hint: Did you mean `package'?

Try `guix --help' for more information.
guix hash (GNU Guix) UNKNOWN
guix: hexpm: command not found
Try `guix --help' for more information.
guix home (GNU Guix) UNKNOWN
guix import (GNU Guix) UNKNOWN
guix import (GNU Guix) UNKNOWN
guix install (GNU Guix) UNKNOWN
guix: json: command not found
Try `guix --help' for more information.
guix lint (GNU Guix) UNKNOWN
guix locate (GNU Guix) UNKNOWN
guix: minetest: command not found
Try `guix --help' for more information.
guix offload (GNU Guix) UNKNOWN
guix: opam: command not found
Try `guix --help' for more information.
guix pack (GNU Guix) UNKNOWN
guix package (GNU Guix) UNKNOWN
/home/simon/src/guix/guix/scripts/guix (GNU Guix) UNKNOWN
guix processes (GNU Guix) UNKNOWN
guix publish (GNU Guix) UNKNOWN
guix pull (GNU Guix) UNKNOWN
guix: pypi: command not found
Try `guix --help' for more information.
guix: reconfigure: command not found
Try `guix --help' for more information.
guix refresh (GNU Guix) UNKNOWN
guix remove (GNU Guix) UNKNOWN
guix repl (GNU Guix) UNKNOWN
guix search (GNU Guix) UNKNOWN
guix search (GNU Guix) UNKNOWN
guix shell (GNU Guix) UNKNOWN
guix show (GNU Guix) UNKNOWN
guix size (GNU Guix) UNKNOWN
guix: stackage: command not found
hint: Did you mean `package'?

Try `guix --help' for more information.
guix style (GNU Guix) UNKNOWN
guix substitute (GNU Guix) UNKNOWN
guix system (GNU Guix) UNKNOWN
guix: texlive: command not found
Try `guix --help' for more information.
guix time-machine (GNU Guix) UNKNOWN
guix upgrade (GNU Guix) UNKNOWN
guix weather (GNU Guix) UNKNOWN
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
$ for cmd in $(find guix/scripts -name "*.scm" -type f -exec basename {} .scm \; | sort); do ./pre-inst-env guix $cmd --help | head -1 ;done
Usage: guix archive [OPTION]... PACKAGE...
Usage: guix authenticate OPTION...
Usage: guix authenticate OPTION...
Usage: guix build [OPTION]... PACKAGE-OR-DERIVATION...
Usage: guix challenge [PACKAGE...]
Usage: guix container ACTION ARGS...
Usage: guix copy [OPTION]... ITEMS...
guix: cpan: command not found
Try `guix --help' for more information.
guix: cran: command not found
Try `guix --help' for more information.
guix: crate: command not found
Try `guix --help' for more information.
Usage: guix deploy [OPTION] FILE...
Usage: guix describe [OPTION]...
Usage: guix discover [OPTION]...
Usage: guix download [OPTION] URL
Usage: guix edit PACKAGE...
Usage: guix edit PACKAGE...
Usage: guix edit PACKAGE...
guix: egg: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix: elm: command not found
Try `guix --help' for more information.
guix: elpa: command not found
Try `guix --help' for more information.
Usage: guix environment [OPTION]... PACKAGE... [-- COMMAND...]
guix environment: warning: This command is deprecated in favor of 'guix shell'.
guix environment: error: fport_write: Broken pipe
guix: exec: command not found
Try `guix --help' for more information.
Usage: guix gc [OPTION]... PATHS...
guix: gem: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
Usage: guix git COMMAND ARGS...
guix: gnu: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
guix: go: command not found
hint: Did you mean `gc'?

Try `guix --help' for more information.
Usage: guix graph PACKAGE...
guix: hackage: command not found
hint: Did you mean `package'?

Try `guix --help' for more information.
Usage: guix hash [OPTION] FILE
guix: hexpm: command not found
Try `guix --help' for more information.
Usage: guix home [OPTION ...] ACTION [ARG ...] [FILE]
Usage: guix import IMPORTER ARGS ...
Usage: guix import IMPORTER ARGS ...
Usage: guix install [OPTION] PACKAGES...
guix: json: command not found
Try `guix --help' for more information.
Usage: guix lint [OPTION]... [PACKAGE]...
Usage: guix locate [OPTIONS...] FILE...
guix: minetest: command not found
Try `guix --help' for more information.
Usage: guix offload SYSTEM MAX-SILENT-TIME PRINT-BUILD-TRACE? BUILD-TIMEOUT
guix: opam: command not found
Try `guix --help' for more information.
Usage: guix pack [OPTION]... PACKAGE...
Usage: guix package [OPTION]...
guix perform-download: error: fixed-output derivation and output file name expected
Usage: guix processes
Usage: guix publish [OPTION]...
Usage: guix pull [OPTION]...
guix: pypi: command not found
Try `guix --help' for more information.
guix: reconfigure: command not found
Try `guix --help' for more information.
Usage: guix refresh [OPTION]... [PACKAGE]...
Usage: guix remove [OPTION] PACKAGES...
Usage: guix repl [OPTIONS...] [-- FILE ARGS...]
Usage: guix search [OPTION] REGEXPS...
Usage: guix search [OPTION] REGEXPS...
Usage: guix shell [OPTION] PACKAGES... [-- COMMAND...]
Usage: guix show [OPTION] PACKAGE...
Usage: guix size [OPTION]... PACKAGE|STORE-ITEM
guix: stackage: command not found
hint: Did you mean `package'?

Try `guix --help' for more information.
Usage: guix style [OPTION]... [PACKAGE]...
Usage: guix substitute OPTION [ARGUMENT]...
Usage: guix system [OPTION ...] ACTION [ARG ...] [FILE]
guix: texlive: command not found
Try `guix --help' for more information.
Usage: guix time-machine [OPTION] -- COMMAND ARGS...
Usage: guix upgrade [OPTION] [REGEXP]
Usage: guix weather [OPTIONS] [PACKAGES ...]
--8<---------------cut here---------------end--------------->8---

Cheers,
simon




  reply	other threads:[~2023-10-16 17:06 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 13:39 [bug#66499] [PATCH] ui: Handle EPIPE errors when displaying Guix version Simon Tournier
2023-10-14  8:13 ` Mathieu Othacehe
2023-10-16 17:04   ` Simon Tournier [this message]
2023-10-17  9:47     ` Mathieu Othacehe
2023-10-17 12:57       ` bug#66499: " Simon Tournier
2023-10-16 17:29 ` [bug#66499] [PATCH v2 01/39] " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 02/39] scripts: archive: Handle EPIPE errors when displaying help Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 03/39] scripts: build: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 04/39] scripts: challenge: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 05/39] scripts: container: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 06/39] scripts: copy: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 07/39] scripts: deploy: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 08/39] scripts: describe: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 09/39] scripts: discover: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 10/39] scripts: download: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 11/39] scripts: edit: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 12/39] scripts: gc: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 13/39] scripts: git: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 14/39] scripts: graph: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 15/39] scripts: hash: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 16/39] scripts: home: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 17/39] scripts: import: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 18/39] scripts: install: " Simon Tournier via Guix-patches
2023-10-16 17:29   ` [bug#66499] [PATCH v2 19/39] scripts: lint: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 20/39] scripts: locate: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 21/39] scripts: offload: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 22/39] scripts: pack: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 23/39] scripts: package: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 24/39] scripts: processes: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 25/39] scripts: publish: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 26/39] scripts: pull: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 27/39] scripts: refresh: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 28/39] scripts: remove: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 29/39] scripts: repl: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 30/39] scripts: search: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 31/39] scripts: shell: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 32/39] scripts: show: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 33/39] scripts: size: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 34/39] scripts: style: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 35/39] scripts: system: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 36/39] scripts: substitute: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 37/39] scripts: time-machine: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 38/39] scripts: upgrade: " Simon Tournier
2023-10-16 17:29   ` [bug#66499] [PATCH v2 39/39] scripts: weather: " Simon Tournier

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=877cnmqz0q.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=66499@debbugs.gnu.org \
    --cc=clement@lassieur.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    /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).