GNU bug report logs - #77093
[PATCH rust-team 00/18] New Rust packaging workflow based on lockfile importer.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Tue, 18 Mar 2025 07:18:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Hilton Chain <hako <at> ultrarare.space>
To: 77093 <at> debbugs.gnu.org
Cc: Hilton Chain <hako <at> ultrarare.space>, Christopher Baines <guix <at> cbaines.net>, Josselin Poiret <dev <at> jpoiret.xyz>, Ludovic Courtès <ludo <at> gnu.org>, Mathieu Othacehe <othacehe <at> gnu.org>, Simon Tournier <zimon.toutoune <at> gmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>
Subject: [bug#77093] [PATCH v4 rust-team 01/22] scripts: import: Correct behavior for ‘--insert’ option.
Date: Tue, 29 Apr 2025 00:22:58 +0800
The info manual documents ‘--insert=FILE’, but it wasn't actually supported.

* guix/scripts/import.scm (show-help): Add missing ‘FILE’.
(guix-import): Accept ‘--insert=FILE’.

Change-Id: I540d5feae3fe49c00e9bd6f7a8649ffe0d6e006d
---
 guix/scripts/import.scm | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm
index bbf31baa15..a85f6c6c49 100644
--- a/guix/scripts/import.scm
+++ b/guix/scripts/import.scm
@@ -69,7 +69,7 @@ (define (show-help)
   (display (G_ "
   -h, --help             display this help and exit"))
   (display (G_ "
-  -i, --insert           insert packages into file alphabetically"))
+  -i, --insert=FILE      insert packages into FILE alphabetically"))
   (display (G_ "
   -V, --version          display version information and exit"))
   (newline)
@@ -106,7 +106,18 @@ (define-command (guix-import . args)
   (category packaging)
   (synopsis "import a package definition from an external repository")
 
-  (match args
+  (define (process-args args)
+    (match args
+      ;; Workaround to accpet ‘--insert=FILE’, for the consistency of
+      ;; command-line interface.
+      ((arg . rest)
+       (if (string-prefix? "--insert=" arg)
+           (append (string-split arg #\=)
+                   rest)
+           args))
+      (_ args)))
+
+  (match (process-args args)
     (()
      (format (current-error-port)
              (G_ "guix import: missing importer name~%")))
-- 
2.49.0





This bug report was last modified 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.