GNU bug report logs - #27180
[PATCH core-updates] utils: Add helper method to invoke programs.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Thu, 1 Jun 2017 07:23:01 UTC

Severity: normal

Tags: patch

Done: Danny Milosavljevic <dannym <at> scratchpost.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: bug#27180: closed (Re: bug#27180: [PATCH core-updates] utils: Add
 helper method to invoke programs.)
Date: Thu, 01 Jun 2017 17:10:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#27180: [PATCH core-updates] utils: Add helper method to invoke programs.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 27180 <at> debbugs.gnu.org.

-- 
27180: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27180
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 27180-done <at> debbugs.gnu.org
Subject: Re: bug#27180: [PATCH core-updates] utils: Add helper method to
 invoke programs.
Date: Thu, 1 Jun 2017 19:09:00 +0200
Good idea to end it with #t :)

Pushed your variant as 3f65c190d23296e7e718c3deff413e8beb61d8ba to core-updates.

[Message part 3 (message/rfc822, inline)]
From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH core-updates] utils: Add helper method to invoke programs.
Date: Thu,  1 Jun 2017 09:22:07 +0200
* guix/build/utils.scm (invoke): New variable.
---
 guix/build/utils.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 6d3c29d00..b2307d9d6 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -84,6 +84,7 @@
             fold-port-matches
             remove-store-references
             wrap-program
+            invoke
 
             locale-category->string))
 
@@ -1058,6 +1059,13 @@ with definitions for VARS."
         (chmod prog-tmp #o755)
         (rename-file prog-tmp prog))))
 
+(define invoke
+  "Invokes the program (array-ref ARGS 0) and gives it ARGS.
+   If the exit code is non-zero, raises an error."
+  (lambda args
+    (if (not (zero? (system* args)))
+      (error (format #f "Failed to invoke ~a" args)))))
+
 
 ;;;
 ;;; Locales.



This bug report was last modified 8 years and 70 days ago.

Previous Next


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