From unknown Tue Jun 17 03:40:09 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32046 <32046@debbugs.gnu.org> To: bug#32046 <32046@debbugs.gnu.org> Subject: Status: [PATCH] import: gem: Add recursive import. Reply-To: bug#32046 <32046@debbugs.gnu.org> Date: Tue, 17 Jun 2025 10:40:09 +0000 retitle 32046 [PATCH] import: gem: Add recursive import. reassign 32046 guix-patches submitter 32046 Oleg Pykhalov severity 32046 normal tag 32046 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 03 16:33:59 2018 Received: (at submit) by debbugs.gnu.org; 3 Jul 2018 20:33:59 +0000 Received: from localhost ([127.0.0.1]:45689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faRzq-0000ld-Mo for submit@debbugs.gnu.org; Tue, 03 Jul 2018 16:33:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faRzo-0000lO-W8 for submit@debbugs.gnu.org; Tue, 03 Jul 2018 16:33:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faRzi-0008JF-4W for submit@debbugs.gnu.org; Tue, 03 Jul 2018 16:33:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58453) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1faRzi-0008Ib-0U for submit@debbugs.gnu.org; Tue, 03 Jul 2018 16:33:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faRzg-0005sU-4p for guix-patches@gnu.org; Tue, 03 Jul 2018 16:33:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faRzc-0008Cr-OZ for guix-patches@gnu.org; Tue, 03 Jul 2018 16:33:48 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:34166) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faRzc-0008Ba-DZ for guix-patches@gnu.org; Tue, 03 Jul 2018 16:33:44 -0400 Received: by mail-lf0-x241.google.com with SMTP id n96-v6so2635660lfi.1 for ; Tue, 03 Jul 2018 13:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=f9cYTa2ZI2rrwgqN2lJ2CxBA0cBKc8FFv9ChIInJmFg=; b=Outx1tTMz1pKBaW1QEmuuc+mxJyD+RcE6nPF2kPYGsqFXZgOx0HcVtx6PNiU5PGHhj qvf3odVArPOo3S8yx50XTPK6nb6kNZv3f5RczvR0DP1FjssBFetCztJ7+9x8FMqPQdl3 nEVj++Ymv/mVifi/3aTmBcRif5Es5P5dtCCNZTv4J9x66GgCOhCSzKS6p6s+f7aTUCRX mhClJkDCsWsWKhLMkhOLtIR/DrR/mguMe7FNIk3pT5fmWdJolDqeIUTOPuWxKMgl5PV1 Csegteb9TEISlASBQ1tLUwZPqZ5QnVSUhvBkDpd0UU/VikeOLZJpYn3HVFg2vjGq9u+Y CAcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=f9cYTa2ZI2rrwgqN2lJ2CxBA0cBKc8FFv9ChIInJmFg=; b=JJDw60wkTLvE0sAVts+852Iv5RSHu9xz1Wl3wYUmPBa76zQ/9VJvQeGDRjRmMfmagR B03/wvEV5SGHzJg/uMRWlwhaqkF32m94x7ekLBzd6aJBed5VlTlmobbxJ/wBg+qIqwck ug3beJTjaznaVBhjfRtBuH00tA/Z3DgL2/OUYlz3YIfn4te+jsm1SfA1BolI39WQNcL8 cN3Qb8ZdxkTSmEaGJLvgY6d0zGWElduxMIkj1qn2QWfJzzEkl2mxJHOGorJv/FaapEhj hMA/8SeTQ3KrcdU8Dwj8ijipmbgjyZfne1jwtEIs6h8QOzn3xnoJPLYqnQZSWDddM3PQ E0VQ== X-Gm-Message-State: APt69E1oHAmfXB3LP9FKMm6pCRmg3OruyikfamXXKniWt4MLLo4aBR9A MvAEN2pqWD/kz7cffckdkGjrLA== X-Google-Smtp-Source: AAOMgpcuPIHGhcaJNaAfqXl0QbEx21qYQEA014ClVGMAUeemq08a9yG7Pvdy2ACR41y528WMrVXZqw== X-Received: by 2002:a19:1f4b:: with SMTP id f72-v6mr13529793lff.42.1530650022544; Tue, 03 Jul 2018 13:33:42 -0700 (PDT) Received: from localhost.localdomain ([178.71.29.246]) by smtp.gmail.com with ESMTPSA id y11-v6sm304582lji.6.2018.07.03.13.33.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 13:33:41 -0700 (PDT) From: Oleg Pykhalov To: guix-patches@gnu.org Subject: [PATCH] import: gem: Add recursive import. Date: Tue, 3 Jul 2018 23:33:27 +0300 Message-Id: <20180703203327.27282-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Oleg Pykhalov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * doc/guix.texi (Invoking guix import): Document gem recursive import. * guix/import/gem.scm (gem->guix-package): Return package and dependencies values. (gem-recursive-import): New procedure. * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. (guix-import-gem): Use 'gem-recursive-import'. --- doc/guix.texi | 8 ++++++ guix/import/gem.scm | 49 ++++++++++++++++++++++--------------- guix/scripts/import/gem.scm | 26 ++++++++++++++++---- 3 files changed, 58 insertions(+), 25 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 841bc2a34..fa24bcf28 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -6370,6 +6370,14 @@ The command below imports metadata for the @code{rails} Ruby package: guix import gem rails @end example +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table + @item cpan @cindex CPAN Import metadata from @uref{https://www.metacpan.org/, MetaCPAN}@footnote{This diff --git a/guix/import/gem.scm b/guix/import/gem.scm index 646163fb7..9e6d2e72e 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson ;;; Copyright © 2016 Ben Woodcroft +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (guix import gem) #:use-module (ice-9 match) #:use-module (ice-9 pretty-print) + #:use-module (ice-9 receive) #:use-module (srfi srfi-1) #:use-module (rnrs bytevectors) #:use-module (json) @@ -33,7 +35,8 @@ #:use-module (guix base32) #:use-module (guix build-system ruby) #:export (gem->guix-package - %gem-updater)) + %gem-updater + gem-recursive-import)) (define (rubygems-fetch name) "Return an alist representation of the RubyGems metadata for the package NAME, @@ -115,29 +118,30 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES." ((license) (license->symbol license)) (_ `(list ,@(map license->symbol licenses))))))) -(define* (gem->guix-package package-name #:optional version) +(define* (gem->guix-package package-name #:optional (repo 'rubygems) version) "Fetch the metadata for PACKAGE-NAME from rubygems.org, and return the `package' s-expression corresponding to that package, or #f on failure." (let ((package (rubygems-fetch package-name))) (and package - (let ((name (assoc-ref package "name")) - (version (assoc-ref package "version")) - (hash (assoc-ref package "sha")) - (synopsis (assoc-ref package "info")) ; nothing better to use - (description (beautify-description - (assoc-ref package "info"))) - (home-page (assoc-ref package "homepage_uri")) - (dependencies (map (lambda (dep) - (let ((name (assoc-ref dep "name"))) - (if (string=? name "bundler") - "bundler" ; special case, no prefix - (ruby-package-name name)))) - (assoc-ref* package "dependencies" - "runtime"))) - (licenses (map string->license - (assoc-ref package "licenses")))) - (make-gem-sexp name version hash home-page synopsis - description dependencies licenses))))) + (let* ((name (assoc-ref package "name")) + (version (assoc-ref package "version")) + (hash (assoc-ref package "sha")) + (synopsis (assoc-ref package "info")) ; nothing better to use + (description (beautify-description + (assoc-ref package "info"))) + (home-page (assoc-ref package "homepage_uri")) + (dependencies-names (map (lambda (dep) (assoc-ref dep "name")) + (assoc-ref* package "dependencies" "runtime"))) + (dependencies (map (lambda (dep) + (if (string=? dep "bundler") + "bundler" ; special case, no prefix + (ruby-package-name dep))) + dependencies-names)) + (licenses (map string->license + (assoc-ref package "licenses")))) + (values (make-gem-sexp name version hash home-page synopsis + description dependencies licenses) + dependencies-names))))) (define (guix-package->gem-name package) "Given a PACKAGE built from rubygems.org, return the name of the @@ -192,3 +196,8 @@ package on RubyGems." (description "Updater for RubyGem packages") (pred gem-package?) (latest latest-release))) + +(define* (gem-recursive-import package-name #:optional version) + (recursive-import package-name '() + #:repo->guix-package gem->guix-package + #:guix-name ruby-package-name)) diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index 349a0a072..64afbd464 100644 --- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) + #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-gem)) @@ -44,6 +46,8 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) -h, --help display this help and exit")) (display (G_ " -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Gem packages that are not yet in Guix")) (newline) (show-bug-report-information)) @@ -56,6 +60,9 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix import pypi"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) %standard-import-options)) @@ -81,11 +88,20 @@ Import and convert the RubyGems package for PACKAGE-NAME.\n")) (reverse opts)))) (match args ((package-name) - (let ((sexp (gem->guix-package package-name))) - (unless sexp - (leave (G_ "failed to download meta-data for package '~a'~%") - package-name)) - sexp)) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (reverse + (stream->list + (gem-recursive-import package-name 'rubygems)))) + (let ((sexp (gem->guix-package package-name))) + (unless sexp + (leave (G_ "failed to download meta-data for package '~a'~%") + package-name)) + sexp))) (() (leave (G_ "too few arguments~%"))) ((many ...) -- 2.18.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 09 08:33:27 2018 Received: (at 32046) by debbugs.gnu.org; 9 Jul 2018 12:33:27 +0000 Received: from localhost ([127.0.0.1]:51802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcVM7-0002rZ-0k for submit@debbugs.gnu.org; Mon, 09 Jul 2018 08:33:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcVM5-0002rN-Q6 for 32046@debbugs.gnu.org; Mon, 09 Jul 2018 08:33:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcVLx-0001m0-Fl for 32046@debbugs.gnu.org; Mon, 09 Jul 2018 08:33:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcVLx-0001lu-BW; Mon, 09 Jul 2018 08:33:17 -0400 Received: from [193.50.110.150] (port=58562 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fcVLw-0007HB-UC; Mon, 09 Jul 2018 08:33:17 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Oleg Pykhalov Subject: Re: [bug#32046] [PATCH] import: gem: Add recursive import. References: <20180703203327.27282-1-go.wigust@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Messidor an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 09 Jul 2018 14:33:15 +0200 In-Reply-To: <20180703203327.27282-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Tue, 3 Jul 2018 23:33:27 +0300") Message-ID: <87sh4sh9mc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32046 Cc: 32046@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Oleg, Oleg Pykhalov skribis: > * doc/guix.texi (Invoking guix import): Document gem recursive import. > * guix/import/gem.scm (gem->guix-package): Return package and dependencies > values. > (gem-recursive-import): New procedure. > * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. > (guix-import-gem): Use 'gem-recursive-import'. Nice! Could you add a test in tests/gem.scm? > (define-module (guix import gem) > #:use-module (ice-9 match) > #:use-module (ice-9 pretty-print) > + #:use-module (ice-9 receive) I don=E2=80=99t think this is needed. > @@ -44,6 +46,8 @@ Import and convert the RubyGems package for PACKAGE-NAM= E.\n")) > -h, --help display this help and exit")) > (display (G_ " > -V, --version display version information and exit")) > + (display (G_ " > + -r, --recursive generate package expressions for all Gem packag= es that are not yet in Guix")) Please keep lines below 80-char wide. Apart form that LGTM. Could you send an updated patch? Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 10 09:32:17 2018 Received: (at 32046) by debbugs.gnu.org; 10 Jul 2018 13:32:17 +0000 Received: from localhost ([127.0.0.1]:53170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcskW-000561-Dz for submit@debbugs.gnu.org; Tue, 10 Jul 2018 09:32:17 -0400 Received: from mail-lf0-f49.google.com ([209.85.215.49]:44079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcskU-00055n-AY for 32046@debbugs.gnu.org; Tue, 10 Jul 2018 09:32:11 -0400 Received: by mail-lf0-f49.google.com with SMTP id g6-v6so7616711lfb.11 for <32046@debbugs.gnu.org>; Tue, 10 Jul 2018 06:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=c83yzyKI3NwP1apnYztcpDNRYPTBiajTkpS7C2T0G64=; b=m88jaQxQmzAGx9URMiAvONqVuKCCP4oLgF/kyQxmoPEfWVruNlbl4wgza6qsAinYTk PTNSdVsSh+NS8sUdR66mrdt4Iagp96PcSB/PxZoOfP+GyGV1H64RobR3Cdb2j5+Jbtx9 r+jA9Ow/5l/7Mu1EmFtfY9Loke/P/xeWCdmKBP8ukjRfUUmrCbaGlpD8AHcxUz6MzkmC D0NvCyod8dko4nV/YLSoXlY39vXWxH2PxhmJliz3omXVj8214kJtk470ASsGjJUTNnwX AKAdpKZfiCX7XQQdy/UpbRb52Esmo60qzCSXl/9uMaDDG8piQNb+SZ5qQK//0Ismemz2 aXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=c83yzyKI3NwP1apnYztcpDNRYPTBiajTkpS7C2T0G64=; b=PIvoEZie14Kdsj3lcuGuQFjReSGoedYnp9x3Pe2m3yUMiGCC5uB7EQvtUxUfJlvCZy QvHSVDLUJLu/RrAkD1AZ93zgt6QBG5HZH2KV5JJ/fy86jzE1BLfqIyk0zgvPKDv2NmRb NMaHb1UdtPbNm3rO7m236XXcRPrfPIOBPGdUzMnMRmioxGInyqKr0RvtxW7QROK77HSc //lSUg/p53ou7HG7VHP2MEhSP3kpI+dN55aWFxRHHq4Fkn26e4dNsooEojX+TOLp00ju 1ksN4yUsGP03JMmk3e53z/eGdfu6NVwr9WdmGqYa2vQ2TESKQztu+AJ4UdQmxI6Lik2P 67Ig== X-Gm-Message-State: APt69E3wTpxuw08F+A03esiLMYQ9fdEjZIiaMbzPRzM2avQeAlNyjrEL 2nXgTJWbl/g2CBQClkW4NXjggg== X-Google-Smtp-Source: AAOMgpdxM3KPHY/rzl5RM35uN18PiHzGdlFMHKCWYPPt+ty3XyoWYF74Imxxdr/JgsZb7iqf4o2Jsg== X-Received: by 2002:a19:9a81:: with SMTP id c123-v6mr3156025lfe.106.1531229523864; Tue, 10 Jul 2018 06:32:03 -0700 (PDT) Received: from magnolia ([178.71.233.99]) by smtp.gmail.com with ESMTPSA id u8-v6sm2705680ljh.52.2018.07.10.06.32.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 06:32:03 -0700 (PDT) From: Oleg Pykhalov To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#32046] [PATCH] import: gem: Add recursive import. References: <20180703203327.27282-1-go.wigust@gmail.com> <87sh4sh9mc.fsf@gnu.org> Date: Tue, 10 Jul 2018 16:31:59 +0300 In-Reply-To: <87sh4sh9mc.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 09 Jul 2018 14:33:15 +0200") Message-ID: <878t6ji5dc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32046 Cc: 32046@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Ludovic, Thank you for review. ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi Oleg, > > Oleg Pykhalov skribis: > >> * doc/guix.texi (Invoking guix import): Document gem recursive import. >> * guix/import/gem.scm (gem->guix-package): Return package and dependenci= es >> values. >> (gem-recursive-import): New procedure. >> * guix/scripts/import/gem.scm (show-help, %options): Add recursive optio= n. >> (guix-import-gem): Use 'gem-recursive-import'. > > Nice! > > Could you add a test in tests/gem.scm? > >> (define-module (guix import gem) >> #:use-module (ice-9 match) >> #:use-module (ice-9 pretty-print) >> + #:use-module (ice-9 receive) > > I don=E2=80=99t think this is needed. > >> @@ -44,6 +46,8 @@ Import and convert the RubyGems package for PACKAGE-NA= ME.\n")) >> -h, --help display this help and exit")) >> (display (G_ " >> -V, --version display version information and exit")) >> + (display (G_ " >> + -r, --recursive generate package expressions for all Gem packages >> that are not yet in Guix")) > > Please keep lines below 80-char wide. > > Apart form that LGTM. Could you send an updated patch? I applied all your suggestions. Here is a new patch. <#secure method=3Dpgpmime mode=3Dsign> --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-import-gem-Add-recursive-import.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] import: gem: Add recursive import. From=20ff11b55aac10d9012690586c670b171bce1f955b Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Tue, 3 Jul 2018 23:28:42 +0300 Subject: [PATCH] import: gem: Add recursive import. * doc/guix.texi (Invoking guix import): Document gem recursive import. * guix/import/gem.scm (gem->guix-package): Return package and dependencies values. (gem-recursive-import): New procedure. * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. (guix-import-gem): Use 'gem-recursive-import'. * tests/gem.scm (test-json): Rename to 'test-foo-json'. ("gem->guix-package"): Use 'test-foo-json'. (test-bar-json, test-bundler-json): New variables. ("gem-recursive-import"): New test. =2D-- doc/guix.texi | 8 +++ guix/import/gem.scm | 48 +++++++++------- guix/scripts/import/gem.scm | 27 +++++++-- tests/gem.scm | 108 +++++++++++++++++++++++++++++++++++- 4 files changed, 163 insertions(+), 28 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7ce364b0a..e406f3c76 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -6380,6 +6380,14 @@ The command below imports metadata for the @code{rai= ls} Ruby package: guix import gem rails @end example =20 +@table @code +@item --recursive +@itemx -r +Traverse the dependency graph of the given upstream package recursively +and generate package expressions for all those packages that are not yet +in Guix. +@end table + @item cpan @cindex CPAN Import metadata from @uref{https://www.metacpan.org/, MetaCPAN}@footnote{T= his diff --git a/guix/import/gem.scm b/guix/import/gem.scm index 646163fb7..ea576b5e4 100644 =2D-- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 David Thompson ;;; Copyright =C2=A9 2016 Ben Woodcroft +;;; Copyright =C2=A9 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,7 +34,8 @@ #:use-module (guix base32) #:use-module (guix build-system ruby) #:export (gem->guix-package =2D %gem-updater)) + %gem-updater + gem-recursive-import)) =20 (define (rubygems-fetch name) "Return an alist representation of the RubyGems metadata for the package= NAME, @@ -115,29 +117,30 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, = and LICENSES." ((license) (license->symbol license)) (_ `(list ,@(map license->symbol licenses))))))) =20 =2D(define* (gem->guix-package package-name #:optional version) +(define* (gem->guix-package package-name #:optional (repo 'rubygems) versi= on) "Fetch the metadata for PACKAGE-NAME from rubygems.org, and return the `package' s-expression corresponding to that package, or #f on failure." (let ((package (rubygems-fetch package-name))) (and package =2D (let ((name (assoc-ref package "name")) =2D (version (assoc-ref package "version")) =2D (hash (assoc-ref package "sha")) =2D (synopsis (assoc-ref package "info")) ; nothing bette= r to use =2D (description (beautify-description =2D (assoc-ref package "info"))) =2D (home-page (assoc-ref package "homepage_uri")) =2D (dependencies (map (lambda (dep) =2D (let ((name (assoc-ref dep "name"))) =2D (if (string=3D? name "bundler") =2D "bundler" ; special case, no p= refix =2D (ruby-package-name name)))) =2D (assoc-ref* package "dependencies" =2D "runtime"))) =2D (licenses (map string->license =2D (assoc-ref package "licenses")))) =2D (make-gem-sexp name version hash home-page synopsis =2D description dependencies licenses))))) + (let* ((name (assoc-ref package "name")) + (version (assoc-ref package "version")) + (hash (assoc-ref package "sha")) + (synopsis (assoc-ref package "info")) ; nothing better= to use + (description (beautify-description + (assoc-ref package "info"))) + (home-page (assoc-ref package "homepage_uri")) + (dependencies-names (map (lambda (dep) (assoc-ref dep "nam= e")) + (assoc-ref* package "dependencies= " "runtime"))) + (dependencies (map (lambda (dep) + (if (string=3D? dep "bundler") + "bundler" ; special case, no pref= ix + (ruby-package-name dep))) + dependencies-names)) + (licenses (map string->license + (assoc-ref package "licenses")))) + (values (make-gem-sexp name version hash home-page synopsis + description dependencies licenses) + dependencies-names))))) =20 (define (guix-package->gem-name package) "Given a PACKAGE built from rubygems.org, return the name of the @@ -192,3 +195,8 @@ package on RubyGems." (description "Updater for RubyGem packages") (pred gem-package?) (latest latest-release))) + +(define* (gem-recursive-import package-name #:optional version) + (recursive-import package-name '() + #:repo->guix-package gem->guix-package + #:guix-name ruby-package-name)) diff --git a/guix/scripts/import/gem.scm b/guix/scripts/import/gem.scm index 349a0a072..b6d9ccaae 100644 =2D-- a/guix/scripts/import/gem.scm +++ b/guix/scripts/import/gem.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 David Thompson +;;; Copyright =C2=A9 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) #:use-module (srfi srfi-37) + #:use-module (srfi srfi-41) #:use-module (ice-9 match) #:use-module (ice-9 format) #:export (guix-import-gem)) @@ -44,6 +46,9 @@ Import and convert the RubyGems package for PACKAGE-NAME.= \n")) -h, --help display this help and exit")) (display (G_ " -V, --version display version information and exit")) + (display (G_ " + -r, --recursive generate package expressions for all Gem packages\ + that are not yet in Guix")) (newline) (show-bug-report-information)) =20 @@ -56,6 +61,9 @@ Import and convert the RubyGems package for PACKAGE-NAME.= \n")) (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix import pypi"))) + (option '(#\r "recursive") #f #f + (lambda (opt name arg result) + (alist-cons 'recursive #t result))) %standard-import-options)) =20 @@ -81,11 +89,20 @@ Import and convert the RubyGems package for PACKAGE-NAM= E.\n")) (reverse opts)))) (match args ((package-name) =2D (let ((sexp (gem->guix-package package-name))) =2D (unless sexp =2D (leave (G_ "failed to download meta-data for package '~a'~%") =2D package-name)) =2D sexp)) + (if (assoc-ref opts 'recursive) + (map (match-lambda + ((and ('package ('name name) . rest) pkg) + `(define-public ,(string->symbol name) + ,pkg)) + (_ #f)) + (reverse + (stream->list + (gem-recursive-import package-name 'rubygems)))) + (let ((sexp (gem->guix-package package-name))) + (unless sexp + (leave (G_ "failed to download meta-data for package '~a'~%= ") + package-name)) + sexp))) (() (leave (G_ "too few arguments~%"))) ((many ...) diff --git a/tests/gem.scm b/tests/gem.scm index a39e8ba51..4220170ff 100644 =2D-- a/tests/gem.scm +++ b/tests/gem.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 David Thompson ;;; Copyright =C2=A9 2016 Ricardo Wurmus +;;; Copyright =C2=A9 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,10 +24,11 @@ #:use-module (guix hash) #:use-module (guix tests) #:use-module ((guix build utils) #:select (delete-file-recursively)) + #:use-module (srfi srfi-41) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) =20 =2D(define test-json +(define test-foo-json "{ \"name\": \"foo\", \"version\": \"1.0.0\", @@ -42,6 +44,34 @@ \"licenses\": [\"MIT\", \"Apache 2.0\"] }") =20 +(define test-bar-json + "{ + \"name\": \"bar\", + \"version\": \"1.0.0\", + \"sha\": \"f3676eafca9987cb5fe263df1edf2538bf6dafc712b30e17be3543a968054= 7a8\", + \"info\": \"Another cool gem\", + \"homepage_uri\": \"https://example.com\", + \"dependencies\": { + \"runtime\": [ + { \"name\": \"bundler\" }, + ] + }, + \"licenses\": [\"MIT\", \"Apache 2.0\"] +}") + +(define test-bundler-json + "{ + \"name\": \"bundler\", + \"version\": \"1.14.2\", + \"sha\": \"3bb53e03db0a8008161eb4c816ccd317120d3c415ba6fee6f90bbc7f7eec8= 690\", + \"info\": \"Ruby gem bundler\", + \"homepage_uri\": \"https://bundler.io/\", + \"dependencies\": { + \"runtime\": [] + }, + \"licenses\": [\"MIT\"] +}") + (test-begin "gem") =20 (test-assert "gem->guix-package" @@ -50,8 +80,8 @@ (lambda (url . rest) (match url ("https://rubygems.org/api/v1/gems/foo.json" =2D (values (open-input-string test-json) =2D (string-length test-json))) + (values (open-input-string test-foo-json) + (string-length test-foo-json))) (_ (error "Unexpected URL: " url))))) (match (gem->guix-package "foo") (('package @@ -76,4 +106,76 @@ (x (pk 'fail x #f))))) =20 +(test-assert "gem-recursive-import" + ;; Replace network resources with sample data. + (mock ((guix http-client) http-fetch + (lambda (url . rest) + (match url + ("https://rubygems.org/api/v1/gems/foo.json" + (values (open-input-string test-foo-json) + (string-length test-foo-json))) + ("https://rubygems.org/api/v1/gems/bar.json" + (values (open-input-string test-bar-json) + (string-length test-bar-json))) + ("https://rubygems.org/api/v1/gems/bundler.json" + (values (open-input-string test-bundler-json) + (string-length test-bundler-json))) + (_ (error "Unexpected URL: " url))))) + (match (stream->list (gem-recursive-import "foo")) + ((('package + ('name "ruby-foo") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('rubygems-uri "foo" 'version)) + ('sha256 + ('base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")= ))) + ('build-system 'ruby-build-system) + ('propagated-inputs + ('quasiquote + (("bundler" ('unquote 'bundler)) + ("ruby-bar" ('unquote 'ruby-bar))))) + ('synopsis "A cool gem") + ('description "This package provides a cool gem") + ('home-page "https://example.com") + ('license ('list 'license:expat 'license:asl2.0))) + ('package + ('name "ruby-bundler") + ('version "1.14.2") + ('source + ('origin + ('method 'url-fetch) + ('uri ('rubygems-uri "bundler" 'version)) + ('sha256 + ('base32 + "1446xiz7zg0bz7kgx9jv84y0s4hpsg61dj5l3qb0i00avc1kxd9v")= ))) + ('build-system 'ruby-build-system) + ('synopsis "Ruby gem bundler") + ('description "Ruby gem bundler") + ('home-page "https://bundler.io/") + ('license 'license:expat)) + ('package + ('name "ruby-bar") + ('version "1.0.0") + ('source + ('origin + ('method 'url-fetch) + ('uri ('rubygems-uri "bar" 'version)) + ('sha256 + ('base32 + "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")= ))) + ('build-system 'ruby-build-system) + ('propagated-inputs + ('quasiquote + (('"bundler" ('unquote 'bundler))))) + ('synopsis "Another cool gem") + ('description "Another cool gem") + ('home-page "https://example.com") + ('license ('list 'license:expat 'license:asl2.0)))) + #t) + (x + (pk 'fail x #f))))) + (test-end "gem") =2D-=20 2.18.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAltEtU8ACgkQckbhHGm3 lWnf4Q/8Ds0wTL/FZHwqRU6W8wQLbQbRr3twvnxG8Rvq3Dkv5yP/qAueqvHzzIYb tafPySLl5xFyHz0g3XwsInaRXUO/P4iGZyjIraw1xArmqEzmnBYVMHEYXaLPKPqk qTwZvkS+Ho+yIr/HTwlenaBMV3zE2uJv7FgvP0zkubM4wGF0JN6D8XNankzha5Fw XmCHiJwgUXwFkVozewu+Wn2eGlYeCygyp+Kc+BXuO3pfLM6cW6Gd85MB/IAJkiVY Sr9lwzCYUd/uf5+CCrzyn2lMYvref0HyUCB4vsEF8tvRzRVEw5v/wk1vEmXNhl6P ArjXA0gyOFtU625J8E0cUCWU6wnAf+3Pa/8ZPC1G7aIHl05/q0ch3yC28PZ5VaRk 54qU48do+HnUJNfRdPJg/F3J2epQ1beyL2lstEwTbFv9qDx3I3KWdCtfwBPbGF3F YGmvVIt75Lx24lE6zvIG80ie8Ak54KbHEpstLGKPjv2SCpumNzCRf23E6n5nTEBq +YlOMLez9tJE+UgEreXnZw2lqEBujnk8Vdsq8XYsQ6qG7soYhywiLRmOVClvY1rf FUCqYU14talzXyP4u4qKzKfgAeARCJvlsshEuOvzgoRRY3Qp71mHY5fSLITucD1e qWLjLZ9Ndz1ExMImXLhfnlUteFbHN7U8sA/xN4rRzp+Swah93jA= =SQC1 -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 10 11:50:32 2018 Received: (at 32046) by debbugs.gnu.org; 10 Jul 2018 15:50:32 +0000 Received: from localhost ([127.0.0.1]:54187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcuuO-000094-Mt for submit@debbugs.gnu.org; Tue, 10 Jul 2018 11:50:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcuuN-00008s-Dy for 32046@debbugs.gnu.org; Tue, 10 Jul 2018 11:50:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcuuE-00059q-VO for 32046@debbugs.gnu.org; Tue, 10 Jul 2018 11:50:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcuuE-00059g-Pe; Tue, 10 Jul 2018 11:50:22 -0400 Received: from [193.50.110.150] (port=37030 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fcuuE-0003vT-Bd; Tue, 10 Jul 2018 11:50:22 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Oleg Pykhalov Subject: Re: [bug#32046] [PATCH] import: gem: Add recursive import. References: <20180703203327.27282-1-go.wigust@gmail.com> <87sh4sh9mc.fsf@gnu.org> <878t6ji5dc.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 Messidor an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 10 Jul 2018 17:50:19 +0200 In-Reply-To: <878t6ji5dc.fsf@gmail.com> (Oleg Pykhalov's message of "Tue, 10 Jul 2018 16:31:59 +0300") Message-ID: <87va9nks3o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32046 Cc: 32046@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hello, Oleg Pykhalov skribis: > From ff11b55aac10d9012690586c670b171bce1f955b Mon Sep 17 00:00:00 2001 > From: Oleg Pykhalov > Date: Tue, 3 Jul 2018 23:28:42 +0300 > Subject: [PATCH] import: gem: Add recursive import. > > * doc/guix.texi (Invoking guix import): Document gem recursive import. > * guix/import/gem.scm (gem->guix-package): Return package and dependencies > values. > (gem-recursive-import): New procedure. > * guix/scripts/import/gem.scm (show-help, %options): Add recursive option. > (guix-import-gem): Use 'gem-recursive-import'. > * tests/gem.scm (test-json): Rename to 'test-foo-json'. > ("gem->guix-package"): Use 'test-foo-json'. > (test-bar-json, test-bundler-json): New variables. > ("gem-recursive-import"): New test. Awesome, it LGTM. Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 11 00:14:03 2018 Received: (at 32046) by debbugs.gnu.org; 11 Jul 2018 04:14:04 +0000 Received: from localhost ([127.0.0.1]:54635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fd6Vv-0005TH-Np for submit@debbugs.gnu.org; Wed, 11 Jul 2018 00:14:03 -0400 Received: from mail-lf0-f44.google.com ([209.85.215.44]:37113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fd6Vt-0005Sa-Jh; Wed, 11 Jul 2018 00:14:02 -0400 Received: by mail-lf0-f44.google.com with SMTP id j8-v6so20118223lfb.4; Tue, 10 Jul 2018 21:14:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=IeEyl4RHxmNrGU0u0yNib49sJeTTHuW0Vpa86cv2Z4M=; b=pdolu8Ve894aRGw8zv97LFdXiz79RnFufA4y7W1EBdSJCi0PhSu6yxuwIS2yJ/MwKM orBK3bNfze+jYJxbAbhSiIFapUrd++L/yNGbM1TQXsS9q+ZCcZ5rB1iUxJsrfkCDS/Ob vvJaDH+FgMQ6EjYkCh5TReHSfCKy0cY8lARE3cqz+KRH0DBmfn1RQfC6AosRoRuJHIxe XFw8QBlsH/8UBzDiS/XazjDTRiad3IkoB9u5RGf9mv0CW8j0a8MF6NVz4/pT7uu+EUzO gToGQtebHuE7rZV+cKVGy+F/BOU9LRrybODEtY2VzjtmgeqnTgxo9MTWMvlH2BCOuJZe oJwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=IeEyl4RHxmNrGU0u0yNib49sJeTTHuW0Vpa86cv2Z4M=; b=m030kUbVCDmNQ1KE8wB7MIkdO0jcIzX8lqCW8V46xSPwZU4FpbJbTwuTFVy0FbS6ZJ EQeC5KW8Jw0N6gncKSK7NYxTJNHJfkf/elhUJchlCeiy2+FyRxvzq+xppsjG8gRC4zdO l0ALciwWa+lilygd6dFZ6NuoZegbX4uGkp6gezXKtGnmFeFwZ9J/BtZ/87KMUwSvFsf3 Jhi9ORcO8yQtLRukUKf/g/fchQuns1SYZni7SV0D3qFHE6uPEL8AYIdg3qHeVKeJc45l 2s/hJDh1vsaPz8n78L4ukhJzHHk859X4HM88CM+CwnEw/ErkahtrGh5w0cUXLcvhUcEj oYWw== X-Gm-Message-State: APt69E1agd4NGMeL7i0YDcaDPP2kaWNKmJlu6RKcn0FxoZm2WBDgTzny QA1S8prWXrA/ebjAK0WfFahSXg== X-Google-Smtp-Source: AAOMgpeYB/vOhe5TXYuE0FfOrf97SsGp++Txe82WzBYMlX6r6jWT8A2NncD5HvCMIvTkLkGTpUJpRg== X-Received: by 2002:a19:8d07:: with SMTP id p7-v6mr4840907lfd.117.1531282435436; Tue, 10 Jul 2018 21:13:55 -0700 (PDT) Received: from magnolia ([178.71.233.99]) by smtp.gmail.com with ESMTPSA id n19-v6sm2930659lja.87.2018.07.10.21.13.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jul 2018 21:13:54 -0700 (PDT) From: Oleg Pykhalov To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#32046] [PATCH] import: gem: Add recursive import. References: <20180703203327.27282-1-go.wigust@gmail.com> <87sh4sh9mc.fsf@gnu.org> <878t6ji5dc.fsf@gmail.com> <87va9nks3o.fsf@gnu.org> Date: Wed, 11 Jul 2018 07:13:49 +0300 In-Reply-To: <87va9nks3o.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 10 Jul 2018 17:50:19 +0200") Message-ID: <871scaif42.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 32046 Cc: 32046-done@debbugs.gnu.org, 32046@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Oleg Pykhalov skribis: > >> From ff11b55aac10d9012690586c670b171bce1f955b Mon Sep 17 00:00:00 2001 >> From: Oleg Pykhalov >> Date: Tue, 3 Jul 2018 23:28:42 +0300 >> Subject: [PATCH] import: gem: Add recursive import. >> >> * doc/guix.texi (Invoking guix import): Document gem recursive import. >> * guix/import/gem.scm (gem->guix-package): Return package and dependenci= es >> values. >> (gem-recursive-import): New procedure. >> * guix/scripts/import/gem.scm (show-help, %options): Add recursive optio= n. >> (guix-import-gem): Use 'gem-recursive-import'. >> * tests/gem.scm (test-json): Rename to 'test-foo-json'. >> ("gem->guix-package"): Use 'test-foo-json'. >> (test-bar-json, test-bundler-json): New variables. >> ("gem-recursive-import"): New test. > > Awesome, it LGTM. Thank you! Pushed as 88388766f778d344699e7a8a0a4d970c403007e3 Thanks, Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAltFg/0ACgkQckbhHGm3 lWkc5Q/+OAjJvNrvX9RVvlBVLQ3XS5NDFjGpw0V9d+b/hXUM+n70GEC3W9fRu10B BRaTCoXnXOoT05DEb3w69nxVQrOoQnFFm6RfvYlYR5ZjCXKGC48nKvrvOo/8THvX uP8zbHg6/T9YVDAzZbiEhrf0Y1gbiq+yJDY12tKMA08R1QKf14gZGMbPuxDOI0ka TguWwnaxy2L8CizyunXogj0yCA2kb7+tTTXdUjlsBnDgunuP6q4dI7FBei1uASSI cdU0nJmCfxRiPjZEHVMQ8PdSu+zBn29c7+bYLYf6LnP2zK/+BnPeakY97UDI0NKT t1rk/2jZfrPbQYHQzz+4bjWPqXgOqD49dXUmvVDVotJOa6dhhOI/haAuT3FlJglg VRARJPlXgpuS0lKFOBLuFYH6KOrXQF07MpVeZB1SL1Yiwuggd6e8QaWDf4tnxvfV ntx63wMrErEZJ2s917xsnKWQaGanilVBOMLmvx0Ac9fjr2MHftlDI2J201RPJZSY 0AyebNBARKx6QwidxA2sK7wsIpT02gSKnWQ01IGSqbzjOk4VP5kFCKOLIPDAWUfN m79uL/1j/RgLvlaDkEuF/N1rsg6K48JMkSOPQMXqmpNf4u9jvmOm53NCQ8C2rSbN 7UbEekOqKR1uA/+0jCzCJT0DBZpBkSRsgGD1XUJTxmLiNLlCqvI= =4wyg -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 17 03:40:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Aug 2018 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator