Bug#921031: Dpkg::Source::Package missing use of ::Format

2019-02-19 Thread Adam Conrad
Package: dpkg
Version: 1.19.4
Followup-For: Bug #921031
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * scripts/Dpkg/Source/Package.pm: use Dpkg::Source:Format (closes: #921031)

Simple enough patch, this seems to resolve the dgit autopkgtest
regressions for us.

... Adam

-- System Information:
Debian Release: buster/sid
  APT prefers disco
  APT policy: (500, 'disco')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-13-lowlatency (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_CA:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru dpkg-1.19.4ubuntu2/debian/control dpkg-1.19.4ubuntu3/debian/control
--- dpkg-1.19.4ubuntu2/debian/control   2019-02-18 07:21:59.0 -0700
+++ dpkg-1.19.4ubuntu3/debian/control   2019-02-19 07:37:22.0 -0700
@@ -1,8 +1,7 @@
 Source: dpkg
 Section: admin
 Priority: required
-Maintainer: Ubuntu Developers 
-XSBC-Original-Maintainer: Dpkg Developers 
+Maintainer: Dpkg Developers 
 Uploaders: Guillem Jover 
 Origin: debian
 Bugs: debbugs://bugs.debian.org
diff -Nru dpkg-1.19.4ubuntu2/scripts/Dpkg/Source/Package.pm 
dpkg-1.19.4ubuntu3/scripts/Dpkg/Source/Package.pm
--- dpkg-1.19.4ubuntu2/scripts/Dpkg/Source/Package.pm   2019-01-23 
05:04:28.0 -0700
+++ dpkg-1.19.4ubuntu3/scripts/Dpkg/Source/Package.pm   2019-02-19 
07:37:16.0 -0700
@@ -56,6 +56,7 @@
 use Dpkg::Path qw(check_files_are_the_same find_command);
 use Dpkg::IPC;
 use Dpkg::Vendor qw(run_vendor_hook);
+use Dpkg::Source::Format;
 
 my $diff_ignore_default_regex = '
 # Ignore general backup files


Bug#921031: Dpkg::Source::Package missing use of ::Format

2019-01-31 Thread Ian Jackson
Package: libdpkg-perl
Version: 1.19.4
User: debian...@lists.debian.org
Usertags: breaks regression

Hi.  I finally investigated the dgit autopkgtest regression.
The error message is:
  Can't locate object method "new" via package "Dpkg::Source::Format" (perhaps 
you forgot to load "Dpkg::Source::Format"?) at 
/usr/share/perl5/Dpkg/Source/Package.pm line 214.

I had mistakenly grokked that as indicating that it was my code which
depended on Dpkg::Source::Format but failed to load it.  However, that
isn't the case.

See transcripts below, where a minimal test program for
Dpkg::Source::Package fails with this error, but only with recent
dpkg.

I haven't dug into the dpkg history to see what change caused this.  I
guess it will be obvious to you.  I think you may just be missing a
`require'.

I thought you would like information report as a bug report.  I
haven't made it `serious' since that doesn't seem necessary as it is
blocking the dpkg testing migration already.

Regards,
Ian.

$ dpkg-query -f'${Version}\n' -W libdpkg-perl
1.19.4
$ cat t.pl
#!/usr/bin/perl -w
use strict;
use Dpkg::Source::Package;
my $dp = new Dpkg::Source::Package filename => $ARGV[0];
print "ok\n";
$ ./t.pl ../bpd/dgit_8.3.dsc
Can't locate object method "new" via package "Dpkg::Source::Format" (perhaps 
you forgot to load "Dpkg::Source::Format"?) at 
/usr/share/perl5/Dpkg/Source/Package.pm line 214.
$ 

Whereas with stretch:

$ dpkg-query -f'${Version}\n' -W libdpkg-perl
1.18.25
$ ./t.pl ../bpd/dgit_8.3.dsc
ok
$ 




-- 
Ian JacksonThese opinions are my own.

If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.