From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 3/4] import: cpan: Use corelist to filter dependencies. Date: Mon, 23 Feb 2015 21:49:12 +0100 Message-ID: <87pp902w1j.fsf@gnu.org> 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> <20150213204637.072ce838@PocketWee> 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]:45347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPzwi-0002Rm-Tq for guix-devel@gnu.org; Mon, 23 Feb 2015 15:49:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPzwe-0005Ti-1M for guix-devel@gnu.org; Mon, 23 Feb 2015 15:49:40 -0500 In-Reply-To: <20150213204637.072ce838@PocketWee> (Eric Bavier's message of "Fri, 13 Feb 2015 20:46:37 -0600") 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: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier skribis: > 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" depen= dencies >> > in converted inputs. >> > * doc/guix.texi (Invoking guix import)[cpan]: Mention corelist filteri= ng. >>=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 modu= les~%")) >>=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 n= ot 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? That=E2=80=99s right, so perhaps my suggestion does not make much sense. Thanks, Ludo=E2=80=99.