pkg_create_dbgsym doesn't cope with multi-line Depends, Suggests, etc.

Bug #384597 reported by Michael Bienia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pkg-create-dbgsym (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: pkg-create-dbgsym

The mplayer build fails during the creation of the -dbgsym packages with the following error:

pkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${shlibs:Depends}
dpkg-gencontrol: warning: unknown substitution variable ${misc:Depends}
dpkg-gencontrol: internal error: field Section has blank lines >video
   ttf-freefont,
   netselect | fping,
   bzip2,
   fontconfig
  ,

   mplayer-doc (<< 1.0~rc3+svn20090426-1)<
Error: parsed ddeb section or priority is empty

(http://launchpadlibrarian.net/27618143/buildlog_ubuntu-karmic-i386.mplayer_2%3A1.0~rc3%2Bsvn20090426-1ubuntu1_FAILEDTOBUILD.txt.gz)

After a look at the pkg_create_dbgsym code this happens because it doesn't filter out multi-line Depends, Suggests, etc. properly.

An example from mplayer's debian/control:

Package: mplayer-nogui
Architecture: any
Section: video
Suggests: mplayer-doc,
          ttf-freefont,
          netselect | fping,
          bzip2,
          fontconfig
Depends: debconf | debconf-2.0,
         ${shlibs:Depends},
         ${misc:Depends}
Replaces: mplayer (<< 1.0~rc3+svn20090426-1),
          mplayer-doc (<< 1.0~rc3+svn20090426-1)
Description: movie player for Unix-like systems
 MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO,
 [...]

Calling "perl -p000 -e 's/^(?:Pre-Depends|Depends|Recommends|Suggests|Conflicts|Provides|Replaces|Breaks|Essential):.*?\n(?! )//msg' debian/control" (taken from pkg_create_dbgsym) results in:

Package: mplayer-nogui
Architecture: any
Section: video
   ttf-freefont,
   netselect | fping,
   bzip2,
   fontconfig
  ${shlibs:Depends},
  ${misc:Depends}
   mplayer-doc (<< 1.0~rc3+svn20090426-1)
Description: movie player for Unix-like systems
 MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO,
 [...]

Revision history for this message
Michael Bienia (geser) wrote :

Looking at the regex the negative look-ahead assertation "(?! )" should probably look for all white-space and not only " ".

Using "perl -p000 -e 's/^(?:Pre-Depends|Depends|Recommends|Suggests|Conflicts|Provides|Replaces|Breaks|Essential):.*?\n(?!\s)//msg' debian/control" will result in

Package: mplayer-nogui
Architecture: any
Section: video
Description: movie player for Unix-like systems
 MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO,
 [...]

which is probably the expected behaviour.

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

Thank you! That makes sense.

Changed in pkg-create-dbgsym (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pkg-create-dbgsym - 0.28

---------------
pkg-create-dbgsym (0.28) karmic; urgency=low

  * Fix multi-line depends parsing if one field evaluates to be empty. Thanks
    to Michael Biena! (LP: #384597)

 -- Martin Pitt <email address hidden> Mon, 08 Jun 2009 07:57:42 +0200

Changed in pkg-create-dbgsym (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.