From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: 01/01: build-system/ruby: Use invoke. Date: Thu, 28 Mar 2019 20:17:49 +0200 Message-ID: <20190328181749.GF28591@macbook41> References: <20190328171804.26056.98950@vcs0.savannah.gnu.org> <20190328171805.4F33A20496@vcs0.savannah.gnu.org> <87k1gikgrr.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3XA6nns4nE4KvaS/" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9Zb7-0002Kw-Rs for guix-devel@gnu.org; Thu, 28 Mar 2019 14:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9Zb6-00082h-RL for guix-devel@gnu.org; Thu, 28 Mar 2019 14:17:53 -0400 Received: from flashner.co.il ([178.62.234.194]:34718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9Zb6-00081r-Go for guix-devel@gnu.org; Thu, 28 Mar 2019 14:17:52 -0400 Content-Disposition: inline In-Reply-To: <87k1gikgrr.fsf@cbaines.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Baines Cc: guix-devel@gnu.org --3XA6nns4nE4KvaS/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 28, 2019 at 06:14:48PM +0000, Christopher Baines wrote: >=20 > guix-commits@gnu.org writes: >=20 > > efraim pushed a commit to branch staging > > in repository guix. > > > > commit 0244952c11c0409597fce5c39dfbcafdfd2ea651 > > Author: Efraim Flashner > > 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-s= ystem.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) >=20 > Hey Efraim, >=20 > Given that invoke raises an exception, I doubt the custom error handling > code here will ever be executed. >=20 > 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? >=20 > 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. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --3XA6nns4nE4KvaS/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlydD8kACgkQQarn3Mo9 g1H8kA/8C2ILCbsEGasSvFZuW3vMqbNP99DxBKI9wy4Ys9kCu/liHbAptrTwuonK 8j5o0qmXL//Mfb1zXU27xs78f3THfE/I4TXXmz3XwTb94g9DCTehscw4WrBPBwuq ogzs4NuCv6q9qMp0MhWk8Ba2l3LxUSYcAE49tq0PQpJWiPWgPqbQVySxClxkRPgQ PflMBA1sn3ybEB7IeRgmx2tqEHRIy38rzcgMZLu74NdjniEfQo+PZ6rXknZ7AUI4 79tds8hzkMdOHokNcbc14l53V1oXoqR+96LgY4niLbNkN3Fv8IRSmyLOoeTjYBbU yN2a1jj7df4wUV7P1HaTbRL8oJCL4Qz5QJFWCncBpWjwf3JKhfzV0g/knIp64M8z RdGJPLQ5zHH8Q0KcK7pSQSnRj7i5ob4NvwTxEGjjRZ7SxFhH2flPcUJ4kT8iPy6E hB3SBVrcYK4qdIRjDe9ZFEuj9pEyEjEljrKsr6WHGbuvSxJmmzzU5HUiuKEjZEQO mtokQvjZuUUE/xhhmv7R2IeUUdXhnRTiDnL5ezYauuk6FxkPlmSUTqanJX5Kd3Y3 zW1OoLQi1HDG7k9Ri8OjDoUWKJwLKH7TwyoJdculNBKw6w4gCln8ArOOQ0pUcOPU /3gJCuf74lVRdcSo/33Hj3F05xWsc9S6cbPftOgQvsKj+v6v8DI= =0Lhx -----END PGP SIGNATURE----- --3XA6nns4nE4KvaS/--