Dpkg::Deps mishandles newlines in Build-Dependencies

Bug #391165 reported by Andrew Sayers
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Debian)
Fix Released
Unknown
dpkg (Ubuntu)
Fix Released
Undecided
Colin Watson

Bug Description

Binary package hint: dpkg

When parsing a control file, the version of Dpkg/Deps.pm in Jaunty will correctly spot the missing comma in this line:

Build-Depends: foo bar

But not in this:

Build-Depends: foo
 bar

This is because Dpkg/Deps.pm searches for whitespace using "\s", which doesn't match newlines. The attached patch fixes the problem by removing newlines from $dep_line. The patch can be applied in the normal way, by doing `patch -p1 < build-deps-newline.patch` from the dpkg-1.14.24ubuntu1 directory.

This bug is the root cause of bug #365770, so the fix is likely to uncover bugs in other packages. I haven't tested this in Karmic or upstream.

Revision history for this message
Andrew Sayers (andrew-bugs-launchpad-net) wrote :
Changed in dpkg (Debian):
status: Unknown → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

This should be fixed by merging dpkg with Debian (they committed a fixed patch in 1.15.3).

Revision history for this message
Andrew Sayers (andrew-bugs-launchpad-net) wrote :

I've now finished checking, and about 30 packages were affected by this bug. These packages will fail to build once 1.15.3 hits, so I suggest either waiting until after Karmic, or merging now while there's still time to fix any knock-on issues. I've filed bugs against the affected packages:

Bug #365770, bug #391546, bug #391554, bug #391557, bug #391564, bug #391566, bug #391571, bug #391574, bug #392202, bug #392205, bug 392207, bug #392210, bug #392217, bug #392222, bug #392225, bug #392232, bug #393049, bug #393050, bug #393053, bug 393056, bug #393097, bug #393098, bug #393099, bug #393105, bug #393108, bug #393109, bug #393110, bug #393113, bug #393114, and bug #393116.

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

Colin is working on a dpkg merge, this will fix this bug.

Changed in dpkg (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
status: New → In Progress
Revision history for this message
Colin Watson (cjwatson) wrote :

I've just uploaded dpkg 1.15.3ubuntu1 to Karmic, including your change which was applied in Debian. Thanks! Please get folks organised to fix all those knock-on bugs ...

Changed in dpkg (Ubuntu):
status: In Progress → 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.