V Wed, May 26, 2021 at 10:30:54AM +0100, Sérgio Basto napsal(a): > fedpkg clone debhelper > cd debhelper > fedpkg srpm && mock -r epel-8-x86_64 --no-clean --rebuild debhelper- > 13.3.4-1.fc35.src.rpm > > I can build the package in _all_ others branches but In epel7 too? > in epel8 ends with > "Initialization of state variables in list context currently forbidden > at /builddir/build/BUILD/debhelper- > 13.3.4/lib/Debian/Debhelper/Dh_Lib.pm line 2021, near");" " > perl has a "splain" tool which explains the compiler errors and warnings: $ splain /usr/bin/splain: Reading from STDIN Initialization of state variables in list context currently forbidden at /home/test/fedora/debhelper/debhelper-13.3.4/lib/Debian/Debhelper/Dh_Lib.pm line 2021, near ");" Initialization of state variables in list context currently forbidden at /home/test/fedora/debhelper/debhelper-13.3.4/lib/Debian/Debhelper/Dh_Lib.pm line 2021, near ");" (#1) (F) state only permits initializing a single scalar variable, in scalar context. So state $a = 42 is allowed, but not state ($a) = 42. To apply state semantics to a hash or array, store a hash or array reference in a scalar variable. What do we have at the line 2021?: state %rrr = map { $_ => 1 } split(' ', $rrr_env); That's it. perl 5.26.3 does not support "state" declaration for hashes (%err). Here is a one-line reproducer: $ perl -e 'use v5.24; sub foo {state %rrr = map { $_ => 1 } split(q{ }, q{});}' Initialization of state variables in list context currently forbidden at -e line 1, near ");" Execution of -e aborted due to compilation errors. Which can be reduced to: $ perl -e 'use v5.24; state %rrr = ();' Initialization of state variables in list context currently forbidden at -e line 1, near ");" Execution of -e aborted due to compilation errors. Please note that the "use v5.24;" statement is taken from debhelper code. It's obviously an upstream bug. The code is not valid syntax for perl 5.24. The state support for non-scalar types was implemented in Perl 5.28.0 (see "perldoc perl5280delta" command output): Initialisation of aggregate state variables A persistent lexical array or hash variable can now be initialized, by an expression such as "state @a = qw(x y z)". Initialization of a list of persistent lexical variables is still not possible. You should reach out depbhelp upstream to correct the "use v5.24;" into "use v5.28;". Or you can ask them to refactor the code to support perl 5.26. If you insist on using that debhelper version on RHEL-8, you can try switching to perl:5.30 module stream which delivers Perl 5.30.1. But you will have to rebuild most of the dephelper dependencies for the new perl yourself. (Because EPEL support for modules is, ehm, mostly undefined and unhelpful.) -- Petr
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure