Subject: Re: bug#26747: [PATCH] gnu: Avoid circular dependencies by perl license
From: [email-masked] (Ludovic Courtès)
To: Petter <[email-masked]>
Cc: [email-masked]
Date: Tue, 02 May 2017 23:29:22 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Petter,

Petter <[email-masked]> skribis:

> I've never been able to add modules to perl.scm. Today civodul showed me that
> it's because "(package-license perl)" in at least a few other files were causing
> circular dependencies with perl.scm. I don't know how to figure out exactly
> which were causing this for perl.scm, so I've changed this in every file with
> this (except perl.scm) to have "license:perl-license" instead. (Fixing just
> what I'd have needed seems like leaving a problem for the next person anyway.)
>
> With this patch I can add modules to perl.scm :)

Nice.  :-)

> P.S.  The error I got was the same as I get with most of my errors: "unknown
> package". At this point I'm beginning to interpret "unknown package" as
> "something failed". I find it that unhelpful, but more misleading. Maybe we
> should discuss this.

Yeah, it’s tricky.  In this case, what happened is that it failed to
load (gnu packages perl).  Thus, the best it could do would be to print
the infamous “no code for module (gnu packages perl)”, which wouldn’t
help.

What would help would be detection circular dependencies due to
top-level references in the first place.

> From 7c39ae8fe3b956eb291fd1bc5ba86297cefb67b8 Mon Sep 17 00:00:00 2001
> From: Petter <[email-masked]>
> Date: Tue, 2 May 2017 16:57:52 +0200
> Subject: [PATCH] gnu: Avoid circular dependencies by perl license
>
> * guix/licenses.scm: New variable.
> * gnu/packages/bioinformatics.scm: Change (package-license perl) to perl-license.
> * gnu/packages/compression.scm: Same.
> * gnu/packages/databases.scm: Same.
> * gnu/packages/gd.scm: Same.
> * gnu/packages/language.scm: Same.
> * gnu/packages/libevent.scm: Same.
> * gnu/packages/mail.scm: Same.
> * gnu/packages/messaging.scm: Same.
> * gnu/packages/ncurses.scm: Same.
> * gnu/packages/networking.scm: Same.
> * gnu/packages/photo.scm: Same.
> * gnu/packages/tcl.scm: Same.
> * gnu/packages/tex.scm: Same.
> * gnu/packages/tls.scm: Same.
> * gnu/packages/web.scm: Same.
> * gnu/packages/wm.scm: Same.
> * gnu/packages/xml.scm: Same.
> * gnu/packages/xorg.scm: Same.
> * gnu/packages/zip.scm: Same.

[...]

> +(define perl-license gpl1+)

I added a comment here and committed.

Thank you!

Ludo’.