Deprecated call in dpkg-dev to init method in Dpkg::Changelog::Entry

Bug #206790 reported by Marc Tardif
8
Affects Status Importance Assigned to Milestone
dpkg (Debian)
Fix Released
Unknown
dpkg (Ubuntu)
Fix Released
Medium
Unassigned
Hardy
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: dpkg

According to the dpkg-dev changelog, some significant changes were made to the Dpkg::Changelog::Entry clas. One of the significant recent changes is the removal of the init method from that class. So, instead of instantiating new entry objects using Dpkg::Changelog::Entry->init(), new Dpkg::Changelog::Entry should be used instead.

The problem is that most of the code was updated accordingly except for one line in /usr/share/perl5/Dpkg/Changelog/Debian.pm:

  $entry = newDpkg::Changelog::Entry->init();

This is causing applications depending on this code such as alien to fail horribly:

  Can't locate object method "init" via package "Dpkg::Changelog::Entry" at
  /usr/share/perl5/Dpkg/Changelog/Debian.pm line 260, <STDIN> line 8.

This is a simple problem to fix, please check it out.

TEST CASE:
apt-get source man-db
cd man-db-*
dpkg-parsechangelog --all

The command will fail on hardy, and work with the hardy-proposed version of dpkg-dev.

Marc Tardif (cr3)
Changed in dpkg:
milestone: none → ubuntu-8.04
Revision history for this message
Marc Tardif (cr3) wrote :
Morten Kjeldgaard (mok0)
Changed in dpkg:
assignee: nobody → mok0
status: New → In Progress
Revision history for this message
Morten Kjeldgaard (mok0) wrote :

Looks good to me. Uploaded.

Changed in dpkg:
assignee: mok0 → nobody
status: In Progress → Fix Committed
Revision history for this message
Morten Kjeldgaard (mok0) wrote :

Silly me, this goes in main. Debdiff attached.

Changed in dpkg:
status: Fix Committed → Confirmed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Søren: can you please take a look at it?

Colin Watson (cjwatson)
Changed in dpkg:
assignee: nobody → shawarma
Steve Langasek (vorlon)
Changed in dpkg:
importance: Undecided → Medium
Steve Langasek (vorlon)
Changed in dpkg:
milestone: ubuntu-8.04 → ubuntu-8.04.1
Revision history for this message
Colin Watson (cjwatson) wrote :

Upstream fixed this in dpkg 1.14.19, now also in Intrepid:

  * Fix changelog parser to not fail when an unexpected changelog entry
    appears without the preceding heading line. Closes: #478925

Should be trivial for an SRU.

Changed in dpkg:
importance: Undecided → Medium
milestone: none → ubuntu-8.04.1
status: New → Confirmed
assignee: soren → nobody
milestone: ubuntu-8.04.1 → none
status: Confirmed → Fix Released
Changed in dpkg:
status: Unknown → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Taking.

Changed in dpkg:
assignee: nobody → pitti
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Any idea how to reproduce this? alien works fine for me (tried on http://fedora.tu-chemnitz.de/pub/linux/fedora/linux/core/6/i386/os/Fedora/RPMS/ElectricFence-2.2.2-20.2.2.i386.rpm), and the example POD in /usr/share/perl5/Dpkg/Changelog/Debian.pm is totally wrong and thus useless for reproducing either.

Revision history for this message
Martin Pitt (pitti) wrote :

Reproducer (thanks to Colin):

dpkg-parsechangelog --all in unpacked man-db source tree (old-style changelog at the bottom).

Revision history for this message
Martin Pitt (pitti) wrote :

The actual code change pretty much *only* affects dpkg-parsechangelog in dpkg-dev, nothing else. However, verification should include standard dpkg operations, such as dpkg -i, dpkg -l, -P, -r, etc., to make sure that the package wasn't mis-compiled.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here

Changed in dpkg:
milestone: ubuntu-8.04.1 → none
status: In Progress → Fix Committed
Steve Langasek (vorlon)
Changed in dpkg:
milestone: none → ubuntu-8.04.1
Steve Beattie (sbeattie)
description: updated
Revision history for this message
Steve Beattie (sbeattie) wrote :

I've reproduced the bug in dpkg-dev 1.14.16.6ubuntu3 and verified that the version in -proposed, 1.14.16.6ubuntu4, does indeed fix the issue.

I'm also running -proposed on my primary system (amd64), and have been using the package for a few days now without any visible problems. Token testing of basic dpkg functionality on a i386 instance also showed no regressions.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, Steve. I have also used the -proposed debs for several days without any problem. Considering verified.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in dpkg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.