From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wF5oAGK2k2Cm7AAAgWs5BA (envelope-from ) for ; Thu, 06 May 2021 11:26:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0KG6N2G2k2DDUAAA1q6Kng (envelope-from ) for ; Thu, 06 May 2021 09:26:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3348E1969D for ; Thu, 6 May 2021 11:26:57 +0200 (CEST) Received: from localhost ([::1]:37486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leaHX-0004Yh-Qo for larch@yhetil.org; Thu, 06 May 2021 05:26:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lea2A-0007K3-Rc for bug-guix@gnu.org; Thu, 06 May 2021 05:11:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lea2A-0005ER-Hk for bug-guix@gnu.org; Thu, 06 May 2021 05:11:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lea2A-0005Hv-Ah for bug-guix@gnu.org; Thu, 06 May 2021 05:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48225: Wrong result of package-name->name+version Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 06 May 2021 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48225 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Sharlatan Hellseher Received: via spool by 48225-submit@debbugs.gnu.org id=B48225.162029223420321 (code B ref 48225); Thu, 06 May 2021 09:11:02 +0000 Received: (at 48225) by debbugs.gnu.org; 6 May 2021 09:10:34 +0000 Received: from localhost ([127.0.0.1]:37092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lea1h-0005Hh-Mv for submit@debbugs.gnu.org; Thu, 06 May 2021 05:10:34 -0400 Received: from mout02.posteo.de ([185.67.36.66]:47021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lea1d-0005Ha-Ey for 48225@debbugs.gnu.org; Thu, 06 May 2021 05:10:32 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D89C6240107 for <48225@debbugs.gnu.org>; Thu, 6 May 2021 11:10:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620292223; bh=8gYOlMXTYT8p3vmqXXyQ14CkA886vUbayoLdIXx8VmA=; h=From:To:Cc:Subject:Date:From; b=BU8hAfpP3BeFS+KHwmbT/SQYPiLQ9VUBK9AKZAKi21fUeyERM6tFEi420h4ls6GQP 8Qwbxjk/u1gRxnlSCDfReRch7ggykt80ef/NSArxpHzesGyjwrXEkQXccd4Dbvq4iX g3XhdKg7NqOmXMmTMLIqVsONF9WwwxxGfZBNXF27vwxEw3xIoONo59lLesH3qTnTYV ZCpCl5uJPdD4qh8tlbKVQuh9DXQiU7bvJJGn3ecUt6Unyj6xcIujns4iz7vud8rXiK 0yDS+xfzrsWsHmJB3/DAfhDI+RLSE68ooVxxEkWCHtEdCxw4PTJkt8pFVI/o3g1f1R 4zm3jZ7VAPAww== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FbSTk0yzRz6tmF; Thu, 6 May 2021 11:10:17 +0200 (CEST) References: <87o8dqy636.fsf@yamatai> From: Guillaume Le Vaillant In-reply-to: Date: Thu, 06 May 2021 09:10:13 +0000 Message-ID: <8735v0b53e.fsf@yamatai> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48225@debbugs.gnu.org, Leo Prikler Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620293217; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=20IovuoYdzDS6jBZpoqUhBRKUXDegqSBekEh6OmSRpA=; b=m/1suueb2N8iE4Q3BCHFCQj3bgfuChA5a4n3bbKfLeMfOhsU9ziT0T9FObsevy1YzZInw2 +2pGczO675Ni/xYBad49GpofV1SiC6/C0pNBgBrDKiI0xRAouaHCbWh20NKniUvv47csNN kwK6klRqXzjGldfufay10oqKZvF/r8Gy6oQHNbej0DDg150O0dH03mZQc5KdgndfIm/Ya5 8ga8jStoXD9fSwwsJc7wsIkSlXWdWD5Wn8pUugs/vvjuEzR/dB2aXGW8+rB97InphBvkQg nq4C7KL++QsBp5Om8sI69XnUavDwoHzMdnwl6DMzb2Lbij5y5ecjDxO3bWgAug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620293217; a=rsa-sha256; cv=none; b=uw43b6kzsEoqm0ZQLI49ODjcMm6Ivc3+OgI9fxmJd5voEBoudhMvM6NTEBKJs134teGwcb ElIf3XPHP4R+uS7NlpVAsLcziaCDvV4HcbzSlETXHp0bgqqQy+U/YNatAjM9IB8OojQyc9 omJhA+YNHgQNNbo9GWed+KV1r9dcry2y2hh6GrzchWrhftWYcmVX67OpEGBqe4FqBt+Nb/ NC+9XtSBokVyGcojrXmIrpI9msh7oFgm+JxRCoi4FNcbiIZyg3MCQZEgFb85cvk/SOZCBV ZUdXQAvNbq3YxUP55lZMS+mlJTP/+/3uyOWV5C3wpP3g1yBqCDz+a9rgef+lsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=BU8hAfpP; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=BU8hAfpP; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 3348E1969D X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: PblH3wqHN9s6 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skribis: > [...] > A better fix would be to not guess and instead pass #:name and #:version > to all the build phases, with the value taken from the object. > (That=E2=80=99s a world-rebuild fix though.) > > WDYT? > >> This is related to issue #48208, and also probably to issue #41437. > > Perhaps we can find a workaround for these? Sharlatan Hellseher skribis: > If chaining `package-name->name+version` function may affect a large > layer of infrastructure here is could a quick adhoc workaround: > > sbcl-3d-vectors -> sbcl-cl3d-vectors > sbcl-3d-vectors -> sbcl-three-d-vectors > sbcl-3d-vectors -> sbcl-iiid-vectors > > Or use any predictable common prefix which could be use and replaced > after the function is reviewed. I agree that having '#:name' and '#:version' available in the build phases would be ideal. Meanwhile I found a workaround for the asdf-build-system that fixes bug#41437 and allows building the 'sbcl-3d-vectors' and 'sbcl-3d-matrices' packages of bug#48208 without having to mangle the package names. It rebuilds all the Common Lisp packages, but that doesn't take too much time. WDYT? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-build-system-asdf-Work-around-package-name-name-vers.patch Content-Transfer-Encoding: quoted-printable From=201e37a89b943a818b5274c1d5f31143ca48bad40a Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Thu, 6 May 2021 10:32:56 +0200 Subject: [PATCH] build-system: asdf: Work around package-name->name+version bug. This patch modifies how the name of the main Common Lisp system is extracted from the full Guix package name to work around bug#48225 concerning the 'package-name->name+version' function. Fixes . * guix/build-system/asdf.scm (asdf-build): Fix 'systems' function. * guix/build/asdf-build-system.scm (main-system-name): Fix it. =2D-- guix/build-system/asdf.scm | 15 +++++++-------- guix/build/asdf-build-system.scm | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/guix/build-system/asdf.scm b/guix/build-system/asdf.scm index 28403a1960..8f9d63337f 100644 =2D-- a/guix/build-system/asdf.scm +++ b/guix/build-system/asdf.scm @@ -291,16 +291,15 @@ set up using CL source package conventions." (imported-modules %asdf-build-system-modules) (modules %asdf-build-modules)) =20 =2D ;; FIXME: The definition of 'systems' is pretty hacky. =2D ;; Is there a more elegant way to do it? (define systems (if (null? (cadr asd-systems)) =2D `(quote =2D ,(list =2D (string-drop =2D ;; NAME is the value returned from `package-full-name'. =2D (hyphen-separated-name->name+version name) =2D (1+ (string-length lisp-type))))) ; drop the "-" pr= efix. + (let* ((lisp-prefix (string-append lisp-type "-")) + (package-name (hyphen-separated-name->name+version + (if (string-prefix? lisp-prefix name) + (string-drop name + (string-length lisp-prefi= x)) + name)))) + `(quote ,(list package-name))) asd-systems)) =20 (define builder diff --git a/guix/build/asdf-build-system.scm b/guix/build/asdf-build-syste= m.scm index 6ad855cab2..5a4fc44aef 100644 =2D-- a/guix/build/asdf-build-system.scm +++ b/guix/build/asdf-build-system.scm @@ -52,12 +52,12 @@ (string-append %source-install-prefix "/systems")) =20 (define (main-system-name output) =2D (let ((package-name (package-name->name+version =2D (strip-store-file-name output))) =2D (lisp-prefix (string-append (%lisp-type) "-"))) =2D (if (string-prefix? lisp-prefix package-name) =2D (string-drop package-name (string-length lisp-prefix)) =2D package-name))) + (let* ((full-name (strip-store-file-name output)) + (lisp-prefix (string-append (%lisp-type) "-")) + (package-name (if (string-prefix? lisp-prefix full-name) + (string-drop full-name (string-length lisp-pref= ix)) + full-name))) + (package-name->name+version package-name))) =20 (define (lisp-source-directory output name) (string-append output (%lisp-source-install-prefix) "/" name)) =2D-=20 2.31.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYJOydQ8cZ2x2QHBvc3Rl by5uZXQACgkQa+ggit8h/j82kgD/eEaXWTxKV/UFOUDeOPSe0b46+I0jAIyDAu5x 0aRyvxgBAJZHbQ4n9rEnP3BeGJi1H0/V0uNF+ipQ/q9QfKLnjoJ/ =LsaU -----END PGP SIGNATURE----- --==-=-=--