From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH 3/4] import: cpan: Use corelist to filter dependencies. Date: Fri, 13 Feb 2015 20:46:37 -0600 Message-ID: <20150213204637.072ce838@PocketWee> References: <1423756695-13378-1-git-send-email-bavier@member.fsf.org> <1423756695-13378-4-git-send-email-bavier@member.fsf.org> <87oaox1jzp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMSk4-0006iY-Bu for guix-devel@gnu.org; Fri, 13 Feb 2015 21:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMSjx-0002Sr-2E for guix-devel@gnu.org; Fri, 13 Feb 2015 21:46:00 -0500 Received: from mail.centurylink.net ([205.219.233.9]:26816 helo=smtp.centurylink.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMSjw-0002Sd-Tw for guix-devel@gnu.org; Fri, 13 Feb 2015 21:45:52 -0500 In-Reply-To: <87oaox1jzp.fsf@gnu.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel@gnu.org On Sat, 14 Feb 2015 00:15:22 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Eric Bavier skribis: >=20 > > * guix/import/cpan.scm (%corelist): New variable. > > (module->dist-name, core-module?): New procedures. > > (cpan-module->sexp)[convert-inputs]: Use them. Include "test" depend= encies > > in converted inputs. > > * doc/guix.texi (Invoking guix import)[cpan]: Mention corelist filterin= g. >=20 > [...] >=20 > > +(define %corelist > > + (let* ((perl (with-store store > > + (derivation->output-path > > + (package-derivation store perl)))) > > + (core (string-append perl "/bin/corelist"))) > > + (and (access? core X_OK) > > + core))) >=20 > What about adding: >=20 > (warning (_ "the 'corelist' command is unavailable, not filtering modul= es~%")) >=20 > ? I like this idea. > Or perhaps it would be even better to take it from $PATH, otherwise the > situation could be confusing: even if Perl is installed, the user could > get an =E2=80=9Cunavailable=E2=80=9D warning just because it=E2=80=99s no= t the exact same Perl. >=20 > WDYT? This might be reasonable if we check first that the perl versions match up. Otherwise the core modules might differ enough to not be helpful. Maybe we could try finding 'corelist' in $PATH if the current perl is not available in the store. In practice we should usually have the most up-to-date 'corelist' in the store, if the packager is using `guix build` to check that the resulting recipe builds, correct? Thanks for the review, `~Eric