From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#31210: Perl graft breakage Date: Wed, 18 Apr 2018 16:52:36 -0400 Message-ID: <20180418205236.GA26365@jasmine.lan> References: <20180415153405.5973-1-mbakke@fastmail.com> <20180418180850.GA11245@jasmine.lan> <87muy0iaxm.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hHWLQfXTYDoKhP50" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8u4g-0004ag-3Y for bug-guix@gnu.org; Wed, 18 Apr 2018 16:53:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8u4d-0007k5-10 for bug-guix@gnu.org; Wed, 18 Apr 2018 16:53:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8u4c-0007jz-OX for bug-guix@gnu.org; Wed, 18 Apr 2018 16:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f8u4b-0003U9-PM for bug-guix@gnu.org; Wed, 18 Apr 2018 16:53:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87muy0iaxm.fsf@netris.org> 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: Mark H Weaver Cc: 31210@debbugs.gnu.org --hHWLQfXTYDoKhP50 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 18, 2018 at 03:14:45PM -0400, Mark H Weaver wrote: > I suggest that we add a phase to the replacement 'perl' to install a > symlink from $out/lib/perl5/5.26.1 pointing to "5.26.2". >=20 > Would you like to try this, Leo, and push it if it solves the problem > for you? Thanks for your advice. The attached patch fixes the issue for me. I would have pushed it but there is one thing I don't understand. Before I set (replacement #f), the build would fail because the new phase was run twice, and symlinking fails because it is not "forced" (as in `ln -sf`). Is this expected behaviour? --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Perl-Fix-a-grafting-failure-due-to-a-path-that-i.patch" Content-Transfer-Encoding: quoted-printable =46rom b49afa6cf9e18d57e67c0580a09e0ee9168218e7 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Wed, 18 Apr 2018 16:41:39 -0400 Subject: [PATCH] gnu: Perl: Fix a grafting failure due to a path that inclu= des the package version. Fixes . * gnu/packages/perl.scm (perl-5.26.2)[arguments]: Add a 'workaround-grafting-version-bug' phase. --- gnu/packages/perl.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 34eef565b..24e055225 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -43,6 +43,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix utils) ;substitute-keyword-arguments for perl-5.26.2 #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages perl-check) @@ -161,13 +162,27 @@ (define-public perl-5.26.2 (package/inherit perl (version "5.26.2") + (replacement #f) (source (origin (inherit (package-source perl)) (uri (string-append "mirror://cpan/src/5.0/perl-" version ".tar.gz")) (sha256 (base32 - "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp"))))= )) + "03gpnxx1g6hvlh0v4aqx00580h787sfywp1vlvw64q2xcbm9qbsp")))) + (arguments + (substitute-keyword-arguments (package-arguments perl) + ((#:phases phases) + `(modify-phases ,phases + ;; The path to libperl.so includes the Perl version number, and= this + ;; is not handled by grafting. See . + (add-after 'install 'workaround-grafting-version-bug + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (new (string-append out "/lib/perl5/5.26.2")) + (old (string-append out "/lib/perl5/5.26.1"))) + (symlink new old) + #t))))))))) =20 (define-public perl-algorithm-c3 (package --=20 2.17.0 --MGYHOYXEY6WxJCY8-- --hHWLQfXTYDoKhP50 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlrXsBEACgkQJkb6MLrK fwhl4xAAmbELxrLVxJl4LdTO0QTeEZGYXwQOgUKdqwrtXN8hkORXVVIRTx/m9ApY hOf/+nOzbnf6CvJHbdIz3EfTweymEAnmTItBuTl4i1S6sembDuAEg/IFOCLzbMvD thsfbHgUGm7tzh3l6V2V7nfwF/WmxAXa2Lh4Zp2TPg0abdHCj1+myy44uoFF1QWP Bj1hXFzdnWEw+5XwiKSXQ8R3e4Lke9j6+tlOVTj2lFvHZ/w0A2M2zxh1qGwkNU/c cLoIflHg1Rd1DJhHksxF0cJwI1odhwxc3mN96tfhNS2sQckwpC5ueYgQllLJzKL6 xTWy0onZMVON/F0bUKi+jdDkF24ER99//Y4PnYO9ElZykeODNJli4S+pJook5OFD a/TwOW9fL4Tsw9wFpx7cRZxsWqlH55ifxseQoQlUouFrprRPYo1dmWYsNrcdCr3h yQ+tqGT3ajLH4+B3MheDRrZo4Owp+TlIfUkvepx/g1pETszSwVpID/EizvVb3ur4 6zmcxWKsaFo0eJZpWdwU2pmaYxYBQc6q//6Y4/nawvzwHE5CFT7fFHo3nvcIo9Ha 3qyOSatgba3ZBjM7gH81R5t3SwBMkVBRRE1N9Ju0rns833W8FQVjKbDdT6aTbIag uE2QQ6cpDVw71sZv09CMrcwG54INAViycIBeKsGCgkai1XxMKlQ= =kgIK -----END PGP SIGNATURE----- --hHWLQfXTYDoKhP50--