Your message dated Fri, 22 Mar 2024 14:52:53 +0000
with message-id <[email protected]>
and subject line Bug#1001403: fixed in debhelper 13.15
has caused the Debian Bug report #1001403,
regarding debhelper: claims it needs perl 5.24, but it seems to require 5.28
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1001403: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001403
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: debhelper
Version: 13.5.2

Hi Niels!

I was looking at backporting 13.5.2 all the way to ubuntu 18.04 bionic,
which ships with perl 5.26.

However, it seems that commit 3b2fe5334b88e38197fa24d9459544e50466fc92
"Dh_Lib.pm: Use state feature (by using v5.24)" doesn't make it a
no-change rebuild.

| debian/rules clean
|./run dh clean --without autoreconf --with build-stamp
|Initialization of state variables in list context currently forbidden at 
/build/debhelper-13.5.2ubuntu1~bpo18.04.1/lib/Debian/Debhelper/Dh_Lib.pm line 
2026, near ");"
|BEGIN not safe after errors--compilation aborted at 
/build/debhelper-13.5.2ubuntu1~bpo18.04.1/lib/Debian/Debhelper/Dh_Lib.pm line 
2748.
|Compilation failed in require at ./dh line 15.
|BEGIN failed--compilation aborted at ./dh line 15.
|debian/rules:15: recipe for target 'clean' failed


Whilst it's true that perl 5.24 introduced the state feature, being able
to initialized a persistant hash or array is a feature that has been
introduced with perl 5.28.
https://perldoc.perl.org/perl5280delta#Initialisation-of-aggregate-state-variables


I'm not sure if I should ask you to fully support perl 5.26, or perhaps
just bump the requirement; I'll leave the choice to you, however of
course I'd prefer the former :)


Incidentally, I believe that this is the background of
24fbbbfb116fc07e1ed2a09eb4e5f6713a74e361, so IMHO you should either bump
_that_ `use`, or, if you elect to support 5.26, revert it in favour of
not using `state` in that form.

Also, if you go the route of not supporting old perl, could you please
consider documenting this in d/control too?


Now, with the little tiny perl knowledge I had I did this.  Following
this change, and reverting 24fbbbfb116fc07e1ed2a09eb4e5f6713a74e361,
debhlper builds fine at the very least.  I'll have to do some tests to
see if it actually works fine too, but I'm optimistic :)


|diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
|index 2fefad69..30c30256 100644
|--- a/lib/Debian/Debhelper/Dh_Lib.pm
|+++ b/lib/Debian/Debhelper/Dh_Lib.pm
|@@ -2014,6 +2014,8 @@ sub _parse_debian_control {
| # - Takes an optional keyword; if passed, this will return true if the 
keyword is listed in R^3 (Rules-Requires-Root)
| # - If the optional keyword is omitted or not present in R^3 and R^3 is not 
'binary-targets', then returns false
| # - Returns true otherwise (i.e. keyword is in R^3 or R^3 is 'binary-targets')
|+{
|+my %rrr;
| sub should_use_root {
|        my ($keyword) = @_;
|        my $rrr_env = $ENV{'DEB_RULES_REQUIRES_ROOT'} // 'binary-targets';
|@@ -2023,10 +2025,11 @@ sub should_use_root {
|        return 1 if $rrr_env eq 'binary-targets';
|        return 0 if not defined($keyword);
| 
|-       state %rrr = map { $_ => 1 } split(' ', $rrr_env);
|+       %rrr = map { $_ => 1 } split(' ', $rrr_env) if not %rrr;
|        return 1 if exists($rrr{$keyword});
|        return 0;
| }
|+}
| 
| # Returns the "gain root command" as a list suitable for passing as a part of 
the command to "doit()"
| sub gain_root_cmd {
|@@ -2139,11 +2142,16 @@ sub is_udeb {
|        return $package_types{$package} eq 'udeb';
| }
| 
|+{
|+my %packages_to_process;
| sub process_pkg {
|        my ($package) = @_;
|-       state %packages_to_process = map { $_ => 1 } @{$dh{DOPACKAGES}};
|+       if (not %packages_to_process) {
|+               %packages_to_process = map { $_ => 1 } @{$dh{DOPACKAGES}};
|+       }
|        return $packages_to_process{$package} // 0;
| }
|+}
| 
| # Only useful for dh(1)
| sub bd_dh_sequences {
|@@ -2938,12 +2946,15 @@ sub perl_cross_incdir {
|        return $incdir;
| }
| 
|+{
|+my %known_packages;
| sub is_known_package {
|        my ($package) = @_;
|-       state %known_packages = map { $_ => 1 } getpackages();
|+       %known_packages = map { $_ => 1 } getpackages() if not %known_packages;
|        return 1 if exists($known_packages{$package});
|        return 0
| }
|+}
| 
| sub assert_opt_is_known_package {
|        my ($package, $method) = @_;
|

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
More about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: debhelper
Source-Version: 13.15
Done: Niels Thykier <[email protected]>

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niels Thykier <[email protected]> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 22 Mar 2024 15:25:39 +0100
Source: debhelper
Architecture: source
Version: 13.15
Distribution: unstable
Urgency: medium
Maintainer: Debhelper Maintainers <[email protected]>
Changed-By: Niels Thykier <[email protected]>
Closes: 1001403 1014537 1021877 1030011 1036760 1062508 1063126 1065742
Changes:
 debhelper (13.15) unstable; urgency=medium
 .
   * d/changelog: Fix typo of Felix Geyer
   * dh_makeshlibs: Ensure t64:Provides is always provided (but
     sometimes empty)
   * Replace `d/compat` with a `X-DH-Compat` field in compat 14+.
     (Closes: #1021877)
   * Ensure values to --dbg-package and --link-doc are known packages
   * PROGRAMMING.md: Add a note about `dh_assistant`
   * Make it easier to re-bootstrap without `dwz` (and also `man-db`).
     This is a new build profile that build `debhelper` with fewer
     dependencies. Note that this profile causes `debhelper` to produce
     a different result in some cases. Packages built with this minimal
     version of debhelper should be rebuilt when bootstrapping is
     complete.
   * dh_shlibdeps: Use ${shlibs:Pre-Depends} for Essential packages
     in compat 14+.
   * dh_gencontrol: Automatically apply relationship substvars in
     compat 14+
   * Clearly document how to do filtering (which is via dh-exec)
     (Closes: #1065742)
   * Reject debhelper config files without a package prefix for
     multi-binary packages in compat 15. Starting in compat 14, it will
     now trigger a warning to have `debian/install` instead of
     `debian/package.install` when `debian/control` contains 2 or more
     binary packages. In compat 15, this is promoted to an error.  The
     main exceptions are files like `debian/changelog`, `debian/NEWS`,
     and `debian/copyright`, which are applied to all packages and can
     still be used without a prefix. (Closes: #1014537)
   * cmake.pm: Pass ASFLAGS as ASMFLAGS to cmake [c14] (Closes: #1036760)
   * meson.pm: Pass --auto-features=enabled in compat 14+
     (Closes: #1030011, #1062508)
   * Dh_Lib.pm: Simplify reset_perm_and_owner so it only works with int
     now. The only misbehaving call-sites where in debhelper itself
     according to codesearch.debian.net and were fixed as well.
   * Dh_Lib.pm: Bump perl version requirement to 5.28 (Closes: #1001403)
   * dh_makeshlibs: Skip directories known not to contain SONAMEs
     (Closes: #1063126)
   * Restructure debhelper upgrade compat checklist for compat 14 in an
     attempt to make it easier for consumers.
Checksums-Sha1:
 427af2800eec90f73f0e8eddc525d08093597a63 1462 debhelper_13.15.dsc
 ffc6783ba068c5e61b77c9a1ba312014ca0f24d8 602412 debhelper_13.15.tar.xz
 1da4a3e2307ea0f604a02e83055000c439216312 5049 debhelper_13.15_source.buildinfo
Checksums-Sha256:
 b29dcec20ca1f546fbbe77644f8429a4b11cbdea0c8ffd781a9804b61620c2a0 1462 
debhelper_13.15.dsc
 752202483eb6c5eae9599b2ee0e80090165d221e20cdeda75f377ad67f4fc84b 602412 
debhelper_13.15.tar.xz
 4b299c5c6fef4e39d1bda32c4585e73bb87d89bf7c958223c667d31e445ef259 5049 
debhelper_13.15_source.buildinfo
Files:
 c8fea2deceec16a304e47a1f23d9c207 1462 devel optional debhelper_13.15.dsc
 20607bc64567ddf155d968653353669a 602412 devel optional debhelper_13.15.tar.xz
 778267813d27c125ec561d47fda541f5 5049 devel optional 
debhelper_13.15_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFGBAEBCgAwFiEE9ecZmu9eXGflVYc/dA1oiINl0okFAmX9ldISHG5pZWxzQHRo
eWtpZXIubmV0AAoJEHQNaIiDZdKJJPkH/2kNXgHiGR1MkA3szMg79FkF5l7v67Ui
0Wqoyhk1o+qYUnTVS8JD2gELySkMZBxz6LaklnmPnMTI/MuOw8wym0BZ6GfvLPbA
RCvqnnPDJBAzESijTYdIkcH0oTSBpGFhluZWPs9JuSLTzhu13SW34Qpbdn6uO4Gd
fvgB8zRKH3+DLU9PGzxZuKuZAqJbl6aiTcxHw4VKvAFVBov4AqcBLuBqOo6xwqyM
32gnd4/OPeSLbAcuse9hGga3tReFGIktyADgXfwd/kEgzOkTqKvW7EQ88KK9FMHT
lJcSmBwbxRYceZrjVpxA7c5NJPdgc43XDBhO0aK5bdfIevXSE3lWDI8=
=CKm5
-----END PGP SIGNATURE-----

Attachment: pgp6hrQanI91T.pgp
Description: PGP signature


--- End Message ---

Reply via email to