From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d74Tx-0007ch-KF for guix-patches@gnu.org; Sat, 06 May 2017 14:31:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d74Tv-0004r3-M2 for guix-patches@gnu.org; Sat, 06 May 2017 14:31:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60341) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d74Tv-0004qf-BB for guix-patches@gnu.org; Sat, 06 May 2017 14:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d74Tv-0004Nt-2J for guix-patches@gnu.org; Sat, 06 May 2017 14:31:03 -0400 Subject: bug#26264: [PATCH 0/1] Use '@' to separate name, version in package-full-name Resent-Message-ID: From: Tobias Geerinckx-Rice References: <20170326122555.22366-1-alex@pompo.co> <6da6e290-feed-e500-e53a-d308e5dc9dde@tobias.gr> <877f3bx4m3.fsf@gmail.com> <87h92d30lw.fsf@gnu.org> <22f867cf-18f8-c08c-259e-afe86bff5ac6@tobias.gr> Message-ID: <45019b9a-565a-82a9-a0de-249cfe211cfa@tobias.gr> Date: Sat, 6 May 2017 20:32:14 +0200 MIME-Version: 1.0 In-Reply-To: <22f867cf-18f8-c08c-259e-afe86bff5ac6@tobias.gr> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CoT2HdjATo7gPB4USLglurN3bPKxnatdv" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: ludo@gnu.org, alex.sassmannshausen@gmail.com Cc: 26264@debbugs.gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CoT2HdjATo7gPB4USLglurN3bPKxnatdv Content-Type: multipart/mixed; boundary="5DS8cntVJCTsNR9Fx1nsmnRJs9vpdxIHd"; protected-headers="v1" From: Tobias Geerinckx-Rice To: ludo@gnu.org, alex.sassmannshausen@gmail.com Cc: 26264@debbugs.gnu.org Message-ID: <45019b9a-565a-82a9-a0de-249cfe211cfa@tobias.gr> Subject: Re: bug#26264: [PATCH 0/1] Use '@' to separate name, version in package-full-name References: <20170326122555.22366-1-alex@pompo.co> <6da6e290-feed-e500-e53a-d308e5dc9dde@tobias.gr> <877f3bx4m3.fsf@gmail.com> <87h92d30lw.fsf@gnu.org> <22f867cf-18f8-c08c-259e-afe86bff5ac6@tobias.gr> In-Reply-To: <22f867cf-18f8-c08c-259e-afe86bff5ac6@tobias.gr> --5DS8cntVJCTsNR9Fx1nsmnRJs9vpdxIHd Content-Type: multipart/mixed; boundary="------------18E772816FBEEA32C902CC8C" This is a multi-part message in MIME format. --------------18E772816FBEEA32C902CC8C Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Guix, On 28/03/17 17:19, Tobias Geerinckx-Rice wrote: > I wouldn't mind giving this a try, or not. More revenge from the pre-new-job-mailbag. I'm sticking to my original patch, and changed the problematic callers to not use =E2=80=98package-full-name=E2=80=99 at all. I don't think it's= the right abstraction in any of those cases. See the overly verbose commit messages= =2E Kind regards, T G-R --------------18E772816FBEEA32C902CC8C Content-Type: text/x-patch; name="0004-packages-Use-as-a-version-separator.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0004-packages-Use-as-a-version-separator.patch" =46rom 43892525fc981533445e60a649425791cc315d0a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 6 May 2017 14:32:12 +0200 Subject: [PATCH 4/4] packages: Use "@" as a version separator. * guix/packages.scm (package-full-name): Use "@" instead of "-" to separa= te PACKAGE-NAME and PACKAGE-VERSION. --- guix/packages.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 44f2c32fb..802405102 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -385,8 +385,8 @@ object." =20 =20 (define (package-full-name package) - "Return the full name of PACKAGE--i.e., `NAME-VERSION'." - (string-append (package-name package) "-" (package-version package))) + "Return the full name of PACKAGE--i.e., `NAME@VERSION'." + (string-append (package-name package) "@" (package-version package))) =20 (define (%standard-patch-inputs) (let* ((canonical (module-ref (resolve-interface '(gnu packages base))= --=20 2.12.2 --------------18E772816FBEEA32C902CC8C Content-Type: text/x-patch; name="0003-profiles-Don-t-use-PACKAGE-FULL-NAME.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0003-profiles-Don-t-use-PACKAGE-FULL-NAME.patch" =46rom 0325e536cf557ff48d885948bf5fab8f59bfc444 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 6 May 2017 14:32:06 +0200 Subject: [PATCH 3/4] profiles: Don't use PACKAGE-FULL-NAME. The non-hash parts of store paths aren't constructed according to PACKAGE-FULL-NAME rules. They just happened to match in the past. * tests/profile.scm ("profile-derivation, cross-compilation"): Use PACKAGE-NAME and PACKAGE-VERSION directly. --- tests/profiles.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/profiles.scm b/tests/profiles.scm index d0b1e14a8..68e73c4ca 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -230,15 +230,18 @@ (and (string-suffix? name input) input))) (derivation-inputs drv)))) =20 + (define (package-store-suffix package) + (string-append (package-name package) "-" (package-version package= ))) + ;; The inputs for grep and sed should be cross-build derivations, bu= t that ;; for the glibc-utf8-locales should be a native build. (return (and (string=3D? (derivation-system drv) (%current-system)) - (string=3D? (find-input (package-full-name packages:gre= p)) + (string=3D? (find-input (package-store-suffix packages:= grep)) (derivation-file-name grep)) - (string=3D? (find-input (package-full-name packages:sed= )) + (string=3D? (find-input (package-store-suffix packages:= sed)) (derivation-file-name sed)) (string=3D? (find-input - (package-full-name packages:glibc-utf8-local= es)) + (package-store-suffix packages:glibc-utf8-lo= cales)) (derivation-file-name locales)))))) =20 (test-assert "package->manifest-entry defaults to \"out\"" --=20 2.12.2 --------------18E772816FBEEA32C902CC8C Content-Type: text/x-patch; name="0002-gnu-gcc-boot0-Don-t-use-PACKAGE-FULL-NAME.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0002-gnu-gcc-boot0-Don-t-use-PACKAGE-FULL-NAME.patch" =46rom f10c4fb9d269b85f9c388356a17c2b8b2fc54bd5 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 6 May 2017 14:31:56 +0200 Subject: [PATCH 2/4] gnu: gcc-boot0: Don't use PACKAGE-FULL-NAME. Don't use Guix's naming conventions where a different one is expected. * gnu/packages/commencement.scm (gcc-boot0)[arguments]: Use PACKAGE-NAME and PACKAGE-VERSION directly. --- gnu/packages/commencement.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.sc= m index 92f6e6c2e..dd3261e37 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -255,7 +255,8 @@ ;; Drop trailing letters, as gmp-6.0.0a unpa= cks ;; into gmp-6.0.0. `(symlink ,(string-trim-right - (package-full-name lib) + (string-append (package-name lib= ) "-" + (package-version = lib)) char-set:letter) ,(package-name lib))) (list gmp-6.0 mpfr mpc)))) --=20 2.12.2 --------------18E772816FBEEA32C902CC8C Content-Type: text/x-patch; name="0001-graph-Don-t-use-PACKAGE-FULL-NAME.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-graph-Don-t-use-PACKAGE-FULL-NAME.patch" =46rom c090e526e21a960f34f0f02f9904757952d5a36e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 6 May 2017 14:31:48 +0200 Subject: [PATCH 1/4] graph: Don't use PACKAGE-FULL-NAME. Derivation files aren't named according to PACKAGE-FULL-NAME rules. We already forfeit any supposed abstraction by manually adding ".drv". * tests/graph.scm ("bag-emerged DAG"): Use PACKAGE-NAME and PACKAGE-VERSI= ON directly. --- tests/graph.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/graph.scm b/tests/graph.scm index 6431c482f..53475597a 100644 --- a/tests/graph.scm +++ b/tests/graph.scm @@ -130,7 +130,9 @@ edges." (map (lambda (destination) (list "p-0.drv" (string-append - (package-full-name destination) + (package-name destination) + "-" + (package-version destination) ".drv"))) implicit))))))) =20 --=20 2.12.2 --------------18E772816FBEEA32C902CC8C-- --5DS8cntVJCTsNR9Fx1nsmnRJs9vpdxIHd-- --CoT2HdjATo7gPB4USLglurN3bPKxnatdv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFBBAEBCgArFiEEeqzfDJ8DWw5d4xcqkczbm0hUG5kFAlkOFq8NHG1lQHRvYmlh cy5ncgAKCRCRzNubSFQbmYDxB/0ZmIHqYf3TIgbaIGSY2qEuy7i7nieB5bghMNlJ zirX/uCsjAkC5S/Gc+UaPPftJ9KO+Zb7HqsKp7pE9s8T3eX+92fNN9Pnrc2/psrg IQ8K5fTuo/doAApwug6mN4P9605tqfWFvDmg40bKUMiizWXJ97jnBs5Ah65fa0CP 5mgU8r/QyNGNG7jf3wmah4ya5pcZSRNBLJ863gsggdH9oOaNgzRaOFrPjg9UNFNv R8zPwjqbg2fFTPV5Iu1DHsb1dIWN3ws6sF0pGUCCZeiptJgDHtXM/tGNc/4/vVgA JO6hHoGrySvA0GHPpC1M2zLzeMYUpc94pqzMbQqNPLCi6o6d =+3RC -----END PGP SIGNATURE----- --CoT2HdjATo7gPB4USLglurN3bPKxnatdv--