unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Christopher Baines <mail@cbaines.net>
Cc: guix-devel@gnu.org
Subject: Re: 01/01: build-system/ruby: Use invoke.
Date: Thu, 28 Mar 2019 20:17:49 +0200	[thread overview]
Message-ID: <20190328181749.GF28591@macbook41> (raw)
In-Reply-To: <87k1gikgrr.fsf@cbaines.net>

[-- Attachment #1: Type: text/plain, Size: 2550 bytes --]

On Thu, Mar 28, 2019 at 06:14:48PM +0000, Christopher Baines wrote:
> 
> guix-commits@gnu.org writes:
> 
> > efraim pushed a commit to branch staging
> > in repository guix.
> >
> > commit 0244952c11c0409597fce5c39dfbcafdfd2ea651
> > Author: Efraim Flashner <efraim@flashner.co.il>
> > Date:   Thu Mar 28 19:17:34 2019 +0200
> >
> >     build-system/ruby: Use invoke.
> >
> >     * guix/build/ruby-build-system.scm (install): Use invoke.
> > ---
> >  guix/build/ruby-build-system.scm | 15 +++++++--------
> >  1 file changed, 7 insertions(+), 8 deletions(-)
> >
> > diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
> > index ba0de12..49400b2 100644
> > --- a/guix/build/ruby-build-system.scm
> > +++ b/guix/build/ruby-build-system.scm
> > @@ -143,14 +143,13 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
> >           (gem-dir (string-append vendor-dir "/gems/" gem-name)))
> >      (setenv "GEM_VENDOR" vendor-dir)
> >
> > -    (or (zero?
> > -         (apply system* "gem" "install" gem-file
> > -                "--verbose"
> > -                "--local" "--ignore-dependencies" "--vendor"
> > -                ;; Executables should go into /bin, not
> > -                ;; /lib/ruby/gems.
> > -                "--bindir" (string-append out "/bin")
> > -                gem-flags))
> > +    (or (apply invoke "gem" "install" gem-file
> > +               "--verbose"
> > +               "--local" "--ignore-dependencies" "--vendor"
> > +               ;; Executables should go into /bin, not
> > +               ;; /lib/ruby/gems.
> > +               "--bindir" (string-append out "/bin")
> > +               gem-flags)
> >          (begin
> >            (let ((failed-output-dir (string-append (getcwd) "/out")))
> >              (mkdir failed-output-dir)
> 
> Hey Efraim,
> 
> Given that invoke raises an exception, I doubt the custom error handling
> code here will ever be executed.
> 
> I guess you could change it to catch the exception, but using system*
> and looking at the exit code seems pretty reasonable to me. What do you
> think?
> 
> Chris

I was looking to get rid of some more of the 'zero? system*' code but I
think you're right. I'll go ahead and revert it and add a note about why
it should be left as-is.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-03-28 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190328171804.26056.98950@vcs0.savannah.gnu.org>
     [not found] ` <20190328171805.4F33A20496@vcs0.savannah.gnu.org>
2019-03-28 18:14   ` 01/01: build-system/ruby: Use invoke Christopher Baines
2019-03-28 18:17     ` Efraim Flashner [this message]
2019-03-29  9:05       ` Christopher Baines

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=20190328181749.GF28591@macbook41 \
    --to=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=mail@cbaines.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).