From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: bug#36504: asdf build system: Add support for component-less .asd Date: Thu, 04 Jul 2019 19:33:23 +0200 Message-ID: <8736jlu2l8.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55622) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj5cR-0003Yw-T9 for bug-guix@gnu.org; Thu, 04 Jul 2019 13:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj5cQ-00037s-RD for bug-guix@gnu.org; Thu, 04 Jul 2019 13:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hj5cQ-00037f-OX for bug-guix@gnu.org; Thu, 04 Jul 2019 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hj5cQ-0001qE-Ha for bug-guix@gnu.org; Thu, 04 Jul 2019 13:34:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:55581) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hj5c2-0003PP-EC for bug-guix@gnu.org; Thu, 04 Jul 2019 13:33:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hj5c0-0002vu-Pa for bug-guix@gnu.org; Thu, 04 Jul 2019 13:33:37 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:55947) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hj5c0-0002sJ-It for bug-guix@gnu.org; Thu, 04 Jul 2019 13:33:36 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 36504@debbugs.gnu.org Cc: Katherine Cox-Buday --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I've just packaged sbcl-trivia (hooray!), which implied packaging the component-less trivia.trivial subsystem. If you look at the package definition, I had to do this in order to compile successfully: =2D-8<---------------cut here---------------start------------->8--- (replace 'create-asd-file (lambda* (#:key outputs inputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib/sbcl")) (level2 (assoc-ref inputs "trivia.level2"))) (mkdir-p lib) (install-file "trivia.trivial.asd" lib) ;; XXX: This .asd does not have any component and the build ;; system fails to work in this case. We should update the ;; build system to handle component-less .asd. ;; TODO: How do we append to file in Guile? It seems that ;; (open-file ... "a") gets a "Permission denied". (substitute* (string-append lib "/trivia.trivial.asd") (("\"\\)") (string-append "\") (progn (asdf/source-registry:ensure-source-registry) (setf (gethash \"trivia.level2\" asdf/source-registry:*source-registry*) #p\"" level2 "/share/common-lisp/sbcl-bundle-systems/tr= ivia.level2.asd\"))")))))) =2D-8<---------------cut here---------------end--------------->8--- Basically our build system fails when the .asd has no component, which is done sometime in Common Lisp packages where a system is only used as an indirection of a union of other systems. I suggest we update `make-asd-file' file in `lisp-utils.scm' to take that into account. Thoughts? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl0eOGMACgkQm9z0l6S7 zH8aRgf+Ju9JeaWxP9NtTcY3JNDopyfDrQiSb/kQJVtUwPK07Xuggj00jdKBwQfJ x5OpryOsTxM/JgJbf1Q03MFZ4zdPXGIkVm7RLfiuy27JN5gfOYn/y97lcSH/8fJK TksnJg/bhtCyTXCA2lQ1LBK3sMaHcS4kCw5VaOn0JbcPe3qAI2OrloqSnhypfBBw KnVQbdaiffWocBDNsvwufqYqP+r0KsTKScueq8zkG0q9zsYZWudEHD8dlfn6tKrH k7R+/ejaXAoXtkBNEDM/jM848yZ2yiAZkOtISk6YWXW8MHOXhI9G8eVGB0R4VGa8 YfAYn6TlsCHRaNXYwSzTg0aeEzNxqw== =lKoy -----END PGP SIGNATURE----- --=-=-=--