[PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB

  • Done
  • quality assurance status badge
Details
3 participants
  • EuAndreh
  • Jelle Licht
  • Maxime Devos
Owner
unassigned
Submitted by
EuAndreh
Severity
normal
E
E
EuAndreh wrote on 30 Jun 2021 16:44
(address . guix-patches@gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20210630144423.3014514-1-eu@euandre.org
* 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.


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

Toggle diff (44 lines)
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
M
M
Maxime Devos wrote on 3 Apr 2022 12:43
591b62923739c45f7d1429023a753bb62b82d708.camel@telenet.be
EuAndreh via Guix-patches via schreef op wo 30-06-2021 om 11:44 [-
0300]:
Toggle quote (5 lines)
> ---
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYkl6bBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7otlAQDuD69Ap0L2VvRgAqKMwsJT7Irk
ydQ1eQXbLfrI3h/BYgEA58McMAvtQ3oo2PYwNNqmjKcD29ZrhP5bhXNo1MtZywM=
=LPvW
-----END PGP SIGNATURE-----


J
J
Jelle Licht wrote on 29 May 2023 13:52
Re: bug#49294: [PATCH] gnu: po4a: Add perl-yaml-tiny to PERL5LIB
(name . EuAndreh)(address . eu@euandre.org)(address . 49294-done@debbugs.gnu.org)
875y8bnyly.fsf@fsfe.org
EuAndreh <eu@euandre.org> writes:

Toggle quote (4 lines)
> * 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.
Closed
E
E
EuAndreh wrote on 2 Jun 2023 14:46
(name . Jelle Licht)(address . jlicht@fsfe.org)(address . 49294@debbugs.gnu.org)
695a61c9-e6e5-d949-b05a-db0f8ea8d3b4@euandre.org
ACK, makes sense. Thanks.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49294@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49294
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch