Your message dated Fri, 10 Jun 2022 16:19:06 +0000
with message-id <[email protected]>
and subject line Bug#808911: fixed in dh-make-perl 0.120
has caused the Debian Bug report #808911,
regarding dh-make-perl: Switch from libdpkg-parse-perl to libdpkg-perl modules
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.)
--
808911: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808911
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dh-make-perl
Version: 0.89-1
Severity: wishlist
X-Debbugs-Cc: Andy Beverley <[email protected]>
[ Filing this as a bug report, to not lose track of it. ]
Hi!
On Mon, 2015-09-28 at 12:37:22 +0100, Andrew Beverley wrote:
> On Mon, 2015-09-28 at 13:12 +0200, Guillem Jover wrote:
> > On Sat, 2015-09-26 at 21:12:57 +0300, Andy Beverley wrote:
> > > Package: wnpp
> > > Owner: Andy Beverley <[email protected]>
> > > Severity: wishlist
> > > X-Debbugs-CC: [email protected],
> > > [email protected]
> > >
> > > * Package name : libdpkg-parse-perl
> >
> > What's the advantage of this over the various modules in libdpkg-perl?
>
> I think it's the only way to retrieve version information. It's a long time
> since I wrote my original patch for dh-make-perl, but I seem to remember
> that DPKG::Parse was the only module that provided certain information I
> needed (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774074).
>
> I certainly tried to do it with other modules already packaged, but I
> couldn't gain all the required information.
The attached untested patch should in principle do it. In any case the
available file is only ever up-to-date when using dselect, so this is
probably not a very generic solution. And if it's too slow, this should
be fixed in libdpkg-perl anyway as that would benefit every caller.
Thanks,
Guillem
From 30408bf2dd2cd7da3a794a1a5869a4cdcf1c8332 Mon Sep 17 00:00:00 2001
From: Guillem Jover <[email protected]>
Date: Tue, 29 Sep 2015 15:06:34 +0200
Subject: [PATCH] Switch from libdpkg-parse-perl to libdpkg-perl modules
---
Build.PL | 3 ++-
debian/control | 1 -
lib/Debian/Control/FromCPAN.pm | 18 ++++++++----------
lib/DhMakePerl/Command/Packaging.pm | 16 +++++-----------
4 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/Build.PL b/Build.PL
index cc3ae8b..e2eaf31 100644
--- a/Build.PL
+++ b/Build.PL
@@ -7,7 +7,6 @@ my $builder = My::Builder->new(
module_name => 'DhMakePerl',
license => 'gpl',
recommends => {
- 'DPKG::Parse' => 0.02,
'Git' => 0,
'IO::Dir' => 0,
},
@@ -24,6 +23,8 @@ my $builder = My::Builder->new(
'CPAN::Meta' => 0,
'Cwd' => 0,
'Dpkg' => 0,
+ 'Dpkg::Index' => 0,
+ 'Dpkg::Control::Types' => 0,
'Dpkg::Source::Package' => 0,
'Email::Address' => 0,
'Email::Date::Format' => 0,
diff --git a/debian/control b/debian/control
index f02f170..2de9da9 100644
--- a/debian/control
+++ b/debian/control
@@ -78,7 +78,6 @@ Depends: debhelper (>= 8),
${perl:Depends}
Recommends: apt-file (>= 2.5.0),
git,
- libdpkg-parse-perl,
pristine-tar
Description: helper for creating Debian packages from perl modules
dh-make-perl will create the files required to build a Debian source
diff --git a/lib/Debian/Control/FromCPAN.pm b/lib/Debian/Control/FromCPAN.pm
index b0895e1..f4d5d48 100644
--- a/lib/Debian/Control/FromCPAN.pm
+++ b/lib/Debian/Control/FromCPAN.pm
@@ -48,11 +48,12 @@ An instance of L<Debian::AptContents> to be used when locating to which package
a required module belongs.
=item dpkg_available
-An instance of L<DPKG::Parse::Available> to be used when checking whether
+
+An instance of L<Dpkg::Index> to be used when checking whether
the locally available package is the required version. For example:
- my $available = DPKG::Parse::Available->new;
- $available->parse;
+ my $available = Dpkg::Index->new(type => CTRL_INFO_PKG);
+ $available->load("$Dpkg::ADMINDIR/available");
=item dir
@@ -272,7 +273,7 @@ L<Debian::Dependencies> class) and a list of missing modules.
Perl core is searched first, then installed packages, then the APT contents.
-If a DPKG::Parse::Available object is passed, also check the available package version
+If a Dpkg::Index object is passed, also check the available package version.
=cut
@@ -307,12 +308,12 @@ sub find_debs_for_modules {
);
# Check the actual version available, if we've been passed
- # a DPKG::Parse::Available object
+ # a Dpkg::Index object
if ( $dpkg_available ) {
my @available;
my @satisfied = grep {
- if ( my $pkg = $dpkg_available->get_package('name' => $_) ) {
- my $have_pkg = Debian::Dependency->new( $_, '=', $pkg->version );
+ if ( my $pkg = $dpkg_available->get_by_key($_) ) {
+ my $have_pkg = Debian::Dependency->new( $_, '=', $pkg->{Version} );
push @available, $have_pkg;
$have_pkg->satisfies($dep);
}
@@ -327,9 +328,6 @@ sub find_debs_for_modules {
push @missing, $module;
}
}
- else {
- warn "DPKG::Parse not available. Not checking version of $module.";
- }
}
if (!$dep && $apt_contents) {
diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 8d96dd9..6f9117b 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -31,6 +31,9 @@ use Config::INI::Reader ();
use CPAN ();
use CPAN::Meta;
use Cwd qw( getcwd );
+use Dpkg;
+use Dpkg::Index;
+use Dpkg::Control::Types;
use Debian::Control::FromCPAN;
use Debian::Dependencies;
use Debian::Rules;
@@ -1391,19 +1394,10 @@ sub discover_dependencies {
# control->discover_dependencies needs configured CPAN
$self->configure_cpan;
- # Attempt to get an instance of DPKG::Parse::Available. If this
- # isn't available, warn the user, as versions of packages cannot
- # be checked.
# Don't cache this in case we've built and installed a
# module in this instance.
- my $dpkg_available;
- if ( eval { require DPKG::Parse::Available } && DPKG::Parse->VERSION >= 0.02 ) {
- $dpkg_available = DPKG::Parse::Available->new;
- $dpkg_available->parse;
- } else {
- warn "DPKG::Parse v0.02 or higher not found.";
- warn "Versions of required packages will not be checked.";
- }
+ my $dpkg_available = Dpkg::Index->new(type => CTRL_INFO_PKG);
+ $dpkg_available->load("$Dpkg::ADMINDIR/available");
return $self->control->discover_dependencies(
{ dir => $self->main_dir,
--
2.6.0.rc2.230.g3dd15c0
--- End Message ---
--- Begin Message ---
Source: dh-make-perl
Source-Version: 0.120
Done: Damyan Ivanov <[email protected]>
We believe that the bug you reported is fixed in the latest version of
dh-make-perl, 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.
Damyan Ivanov <[email protected]> (supplier of updated dh-make-perl 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: SHA256
Format: 1.8
Date: Fri, 10 Jun 2022 15:56:16 +0000
Source: dh-make-perl
Architecture: source
Version: 0.120
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <[email protected]>
Changed-By: Damyan Ivanov <[email protected]>
Closes: 808911
Changes:
dh-make-perl (0.120) unstable; urgency=medium
.
[ Damyan Ivanov ]
* replace usage of DPKG::Parse::Available with Dpkg::Index.
(Closes: #808911)
* move the slow check for locally installed packages after the APT contents
check
* add automatic annotation of B-D with <!nocheck>. guarded with
--guess-nocheck
Checksums-Sha1:
f4d93fd3cb15ca3ca5e37ae9a56a7298cc82d6c1 2895 dh-make-perl_0.120.dsc
5425b6afa1954fc4f3c7ad3f5b7b9878cf6eef21 120776 dh-make-perl_0.120.tar.xz
Checksums-Sha256:
0b35edcd9094de6a836f951bb5328049c0136ddfd499f29822def5a742dc90d8 2895
dh-make-perl_0.120.dsc
02272060966a013da32a3a17a77d8c316261e65cccd40d1288697c05a75598b3 120776
dh-make-perl_0.120.tar.xz
Files:
0a03bd1bae0f378c2867a57baf1d4eb2 2895 perl optional dh-make-perl_0.120.dsc
3b9f08b4536ce7e835d6267485e396c6 120776 perl optional dh-make-perl_0.120.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEErqDETssFbpNjDZ0z276dTZnSoAQFAmKjatwACgkQ276dTZnS
oASbiA/8CVUsD77sEyAhHUAVUaOGBXFM2slvWD2Z48UfPxBX6KHsmHT1dmeRQxXJ
JcG6KmHZBs2EiR9N7OHnh90iYXQSGpO6+a4z7PRXjrVi2LvIaPltOuxnPmpQwPlB
SmrGQclkoCMUau3eG+cXbBmO6GcuUW0Hzj8i+R0aqdjIU1ivU8CoTHYf5Z7WFDI+
8KNhihXTxcsJWnLvyqy87NvO/Br2SUg83RvwZNhcplQJyc1IHreq9QGGj5LimlFF
eoRnYPq1Js4oyP0RnAgkkMhpud81nO/sUfNx32hDN/34lytpTRtQ1pB9wwHpYt5z
eJ1UlbHG74ecPKNJWNrgQQEf5JL4UOXs4Dm8R/ljIR+AJYHfbSPCMtVt/nF+fI4F
En4cB2lB5yxEa8y5YPbavUyDHYeF+3/OPJf4BA9arW3haVJySOJqURJuE1LU7DaA
aqQ5vvQa+NW2wMV7GJ6cjGHqC8b+aN2Nl2sHyfBHwjDs5nTTBODdTFc4J6TB+6ng
yct26bzfN+cl/qYRk6hH/VL5Rd4+qt3ry6nYPrrb4VwIOOtej0s9i0u+Qzs/ZX3M
XSf3fm0WR7RCf+00eC9ochOfCn4BNNjU67I3Pd2PWGlhcXtOFeUiaB2aXAIPy/yU
Z/W0eKavn3SpQyEi5GtLodRy3+VF1zHlPLeX8ft4Tm0pYSbo2Lw=
=7jBX
-----END PGP SIGNATURE-----
--- End Message ---