GNU bug report logs - #49294
[PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB

Previous Next

Package: guix-patches;

Reported by: EuAndreh <eu <at> euandre.org>

Date: Wed, 30 Jun 2021 14:47:01 UTC

Severity: normal

Tags: patch

Done: Jelle Licht <jlicht <at> fsfe.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49294 in the body.
You can then email your comments to 49294 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49294; Package guix-patches. (Wed, 30 Jun 2021 14:47:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to EuAndreh <eu <at> euandre.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 30 Jun 2021 14:47:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: guix-patches <at> gnu.org
Cc: EuAndreh <eu <at> euandre.org>
Subject: [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB
Date: Wed, 30 Jun 2021 11:44:23 -0300
* gnu/packages/gettext.scm (po4a): Include perl-yaml-tiny dependency in
  PERL5LIB search path of executables.
  [native-inputs]: Remove perl-yaml-tiny.
  [propagated-inputs]: Add perl-yaml-tiny.

---
The "use YAML::Tiny;" [0] statement is failing, because the library was
included in the list of dependencies, but was not being propagated and
not put in PERL5LIB, and resulted in an error:

```
$ po4a-updatepo -f text -m f.txt -p l.po -v
Unknown format type: text.
po4a::chooser: Module loading error: Can't locate YAML/Tiny.pm in @INC (you may need to install the YAML::Tiny module) (@INC contains: /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/x86_64-linux-thread-multi /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2 /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/site_perl/5.30.2/x86_64-linux-thread-multi /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/site_perl/5.30.2 /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/5.30.2/x86_64-linux-thread-multi /gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2/lib/perl5/5.30.2) at /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/Locale/Po4a/Text.pm line 60.
BEGIN failed--compilation aborted at /gnu/store/6ba47ndbbaf1h8qrsss9lfji0xvmh8px-po4a-0.61/lib/perl5/site_perl/5.30.2/Locale/Po4a/Text.pm line 60.
Compilation failed in require at (eval 22) line 1.
BEGIN failed--compilation aborted at (eval 22) line 1.
```

This patch addresses that, and now the use statement works as expected.

[0]: https://github.com/mquinson/po4a/blob/a69b48eda3ebd66eec30a34a377c7a00c6f8e36c/lib/Locale/Po4a/Text.pm#L60

 gnu/packages/gettext.scm | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index 21228694d7..e4cd139393 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -238,17 +238,19 @@ from Markdown files.")
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'install 'wrap-programs
-          (lambda* (#:key outputs #:allow-other-keys)
+          (lambda* (#:key outputs inputs #:allow-other-keys)
             ;; Make sure all executables in "bin" find the Perl modules
             ;; provided by this package at runtime.
-            (let* ((out  (assoc-ref outputs "out"))
-                   (bin  (string-append out "/bin/"))
-                   (path (string-append out "/lib/perl5/site_perl")))
+            (let* ((out       (assoc-ref outputs "out"))
+                   (bin       (string-append out "/bin/"))
+                   (path      (string-append out "/lib/perl5/site_perl"))
+                   (deps-path (string-append (assoc-ref inputs "perl-yaml-tiny")
+                                             "/lib/perl5/site_perl")))
               (for-each (lambda (file)
                           (wrap-program file
-                            `("PERL5LIB" ":" prefix (,path))))
-                        (find-files bin "\\.*$"))
-              #t)))
+                            `("PERL5LIB" ":" prefix (,path
+                                                     ,deps-path))))
+                        (find-files bin "\\.*$")))))
          (add-before 'reset-gzip-timestamps 'make-compressed-files-writable
            (lambda* (#:key outputs #:allow-other-keys)
              (for-each make-file-writable
@@ -284,8 +286,9 @@ from Markdown files.")
        ;; For tests.
        ("docbook-xml" ,docbook-xml-4.1.2)
        ("perl-test-pod" ,perl-test-pod)
-       ("perl-yaml-tiny" ,perl-yaml-tiny)
        ("texlive" ,texlive-tiny)))
+    (propagated-inputs
+     `(("perl-yaml-tiny" ,perl-yaml-tiny)))
     (home-page "https://po4a.org/")
     (synopsis "Scripts to ease maintenance of translations")
     (description
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#49294; Package guix-patches. (Sun, 03 Apr 2022 10:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 49294 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: EuAndreh <eu <at> euandre.org>, 49294 <at> debbugs.gnu.org
Subject: Re: [bug#49294] [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB
Date: Sun, 03 Apr 2022 12:43:56 +0200
[Message part 1 (text/plain, inline)]
EuAndreh via Guix-patches via schreef op wo 30-06-2021 om 11:44 [-
0300]:
> ---
> The "use YAML::Tiny;" [0] statement is failing, because the library was
> included in the list of dependencies, but was not being propagated and
> not put in PERL5LIB, and resulted in an error:

Adding it to PERL5LIB and moving it from native-inputs to non-native
inputs looks reasonable to me.  However: does it need to be propagated,
or is adding it to PERL5LIB sufficient?

Also, how many dependents are there (try "guix refresh -l")?  Maybe it
needs to be on core-updates.  Additionally, ca 'perl-yaml-tiny' now be
removed from 'kicad-doc' and 'qgis'?

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

Reply sent to Jelle Licht <jlicht <at> fsfe.org>:
You have taken responsibility. (Mon, 29 May 2023 11:53:01 GMT) Full text and rfc822 format available.

Notification sent to EuAndreh <eu <at> euandre.org>:
bug acknowledged by developer. (Mon, 29 May 2023 11:53:01 GMT) Full text and rfc822 format available.

Message #13 received at 49294-done <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: EuAndreh <eu <at> euandre.org>
Cc: 49294-done <at> debbugs.gnu.org
Subject: Re: bug#49294: [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB
Date: Mon, 29 May 2023 13:52:41 +0200
EuAndreh <eu <at> euandre.org> writes:

> * gnu/packages/gettext.scm (po4a): Include perl-yaml-tiny dependency in
>   PERL5LIB search path of executables.
>   [native-inputs]: Remove perl-yaml-tiny.
>   [propagated-inputs]: Add perl-yaml-tiny.
[snip]

Superseded by commit a1f9eba892784069e34338e01237a74b8a3bd8a2. Closing.




Information forwarded to guix-patches <at> gnu.org:
bug#49294; Package guix-patches. (Fri, 02 Jun 2023 12:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 49294 <at> debbugs.gnu.org (full text, mbox):

From: EuAndreh <eu <at> euandre.org>
To: Jelle Licht <jlicht <at> fsfe.org>
Cc: 49294 <at> debbugs.gnu.org
Subject: Re: bug#49294: [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB
Date: Fri, 2 Jun 2023 09:46:50 -0300
ACK, makes sense.  Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 01 Jul 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year 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.