GNU bug report logs - #48630
[PATCH] adds `ack' package and it's perl module dependency File::Next

Previous Next

Package: guix-patches;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Mon, 24 May 2021 19:12:01 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Gabriel Wicki <gabriel <at> erlikon.ch>, 48630 <at> debbugs.gnu.org
Subject: [bug#48630] Acknowledgement ([PATCH] adds `ack' package and it's perl module dependency File::Next)
Date: Tue, 25 May 2021 23:34:26 +0200
[Message part 1 (text/plain, inline)]
On Tue, May 25 2021, Gabriel Wicki wrote:

> thanks for the advice, i'll update and split the patch into a small
> series soon!

Great! :)

> the tests are deactivated because 3 of 841 fail. they seem to check
> some kind of shebang #! paths. see this excerpt from the build log:
>
> #   Failed test 'Util::sets_match( TEST_TYPE with -t perl )'
> #   at t/ack-type.t line 43.
>
> 	# actual[
> 	#   't/swamp/0:1:#!/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/bin/perl -w',
> ...
> 	# ]
> 	# expected[
> 	#   't/swamp/0:1:#!/usr/bin/perl -w',
> ...
> 	# ]
>
> these lines are being ignored by the patch-generated-file-shebangs
> phase, maybe because the #! aren't at the beginning of the line?
>
> i'm a total novice in Perl, so i'm not sure what exactly is happening
> there or why this is even tested.
>
> should i try and add my own version of a patch-shebang after the
> patch-generated-file-shebangs phase?

Yes, you could add add a phase after the ‘patch-generated-file-shebangs’
phase that replaces #!/usr/bin/perl with #!/gnu/store/...-perl/bin/perl.
Something like this should work (untested):

#+begin_src scheme
(add-after 'patch-generated-file-shebangs 'patch-more-shebangs
  (lambda (#:key inputs #:allow-other-keys)
    (substitute* '("t/ack-type.t" ...)
      (let ((perl (assoc-ref inputs "perl")))
        (("/usr/bin/perl")
         (string-append perl "/bin/perl"))))))
#+end_src         

[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.