Comment 11 for bug 436182

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I'm setting the status back to Triaged, as what we've committed is a work-around - not a fix. It's a work-around that we can cherry-pick if necessary, and it will ensure that there are no trailing '\n' at end of fields in the Sources index file, so that the file can be correctly parsed by apt_pkg.ParseTagFile().

The work-around does not ensure that the stray trailing '\n' will not get into the SPR.dsc_binaries field in the first place, nor does it fix the corrupt data. Hence leaving this bug open.

I've not verified it yet, but we're 90% certain that when there are valid single '\n' chars within a field's values (as in the snippet in the bug description above), the lp.archiveuploader.parse_tagfile_lines is appending a trailing '\n' to the end of the value (also shown in the snippet above) - and it is this trailing '\n' that is invalid and causing the problem (If/when I have read access, we can simply run a slightly modified version of Celso's above query with the condition '%\n' to verify that these SPRs all have an invalid trailing '\n'.

I can't see any reason why we are not simply using apt_pkg.ParseTagFile() instead of our own parse_tagfile_lines() method, so I'd be keen to replace it if there is no reason not to. Celso's thought was that, as we are seeing more and more debian packages with the valid '\n' coming through, this issue could snow-ball, meaning more corrupt data for which we are relying on the work-around.

As another example, currently the Sources in the following ppa (identified by Celso's query above) displays the problem also:
http://ppa.launchpad.net/awe/ppa/ubuntu/dists/karmic/main/source/Sources
{{{
Package: linux
Binary: linux-source-2.6.31, linux-doc, linux-headers-2.6.31-10, linux-libc-dev, linux-image-2.6.31-10-386, linux-headers-2.6.31-10-386, linux-image-debug-2.6.31-10-386, linux-image-2.6.31-10-generic, linux-headers-2.6.31-10-generic, linux-image-debug-2.6.31-10-generic, linux-image-2.6.31-10-generic-pae, linux-headers-2.6.31-10-generic-pae, linux-image-debug-2.6.31-10-generic-pae, linux-image-2.6.31-10-ia64, linux-headers-2.6.31-10-ia64, linux-image-debug-2.6.31-10-ia64, linux-image-2.6.31-10-lpia, linux-headers-2.6.31-10-lpia, linux-image-debug-2.6.31-10-lpia, linux-image-2.6.31-10-powerpc, linux-headers-2.6.31-10-powerpc, linux-image-debug-2.6.31-10-powerpc, linux-image-2.6.31-10-powerpc64-smp, linux-headers-2.6.31-10-powerpc64-smp, linux-image-debug-2.6.31-10-powerpc64-smp, linux-image-2.6.31-10-powerpc-smp, linux-headers-2.6.31-10-powerpc-smp, linux-image-debug-2.6.31-10-powerpc-smp, linux-image-2.6.31-10-server, linux-headers-2.6.31-10-server, linux-image-debug-2.6.31-10-server,
linux-image-2.6.31-10-sparc64, linux-headers-2.6.31-10-sparc64, linux-image-debug-2.6.31-10-sparc64, linux-image-2.6.31-10-sparc64-smp, linux-headers-2.6.31-10-sparc64-smp, linux-image-debug-2.6.31-10-sparc64-smp, linux-image-2.6.31-10-virtual, kernel-image-2.6.31-10-generic-di, nic-modules-2.6.31-10-generic-di, nic-shared-modules-2.6.31-10-generic-di, serial-modules-2.6.31-10-generic-di, ppp-modules-2.6.31-10-generic-di, firewire-core-modules-2.6.31-10-generic-di, scsi-modules-2.6.31-10-generic-di, plip-modules-2.6.31-10-generic-di, floppy-modules-2.6.31-10-generic-di, fat-modules-2.6.31-10-generic-di, nfs-modules-2.6.31-10-generic-di, md-modules-2.6.31-10-generic-di, usb-modules-2.6.31-10-generic-di, pcmcia-storage-modules-2.6.31-10-generic-di, fb-modules-2.6.31-10-generic-di, input-modules-2.6.31-10-generic-di, mouse-modules-2.6.31-10-generic-di, irda-modules-2.6.31-10-generic-di, parport-modules-2.6.31-10-generic-di, nic-pcmcia-modules-2.6.31-10-generic-di, pcmcia-modules-2.6.31-10-generic-di,
nic-usb-modules-2.6.31-10-generic-di, sata-modules-2.6.31-10-generic-di, crypto-modules-2.6.31-10-generic-di, char-modules-2.6.31-10-generic-di, fs-core-modules-2.6.31-10-generic-di, fs-secondary-modules-2.6.31-10-generic-di, pata-modules-2.6.31-10-generic-di, storage-core-modules-2.6.31-10-generic-di, block-modules-2.6.31-10-generic-di, message-modules-2.6.31-10-generic-di, virtio-modules-2.6.31-10-generic-di

Version: 2.6.31-10.35~awe1
Section: devel
Maintainer: Ubuntu Kernel Team <email address hidden>
Build-Depends: debhelper (>= 3), module-init-tools, kernel-wedge (>= 2.24ubuntu1), makedumpfile [amd64 i386 lpia], device-tree-compiler [powerpc]
Build-Depends-Indep: xmlto, docbook-utils, gs, transfig, bzip2, sharutils
Build-Conflicts: findutils (= 4.4.1-1ubuntu1)
Architecture: all i386 amd64 lpia ia64 powerpc sparc
Standards-Version: 3.6.1
Format: 1.0
Directory: pool/main/l/linux
Files:
 16c0355d3612806ef87addf7c9f8c9f9 78278595 linux_2.6.31.orig.tar.gz
 2fcc48c782e71612c2b33e11d2df2b1b 2471030 linux_2.6.31-10.35~awe1.diff.gz
 accc50180e03ad902406b75e08e79955 3751 linux_2.6.31-10.35~awe1.dsc

Package: network-manager-openvpn
Binary: network-manager-openvpn
Version: 0.8~a~git.20090831t215704.5dd87bd-0ubuntu1~awe1

}}}