apt-ftparchive might write corrupt Release files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Medium
|
Dereck Wonnacott |
Bug Description
Binary package hint: apt-utils
If apt-ftparchive finds stuff to warn about, it can insert a rogue newline into stdout which ends up in the Release file. E.g:
> apt-ftparchive release .
Date: Wed, 24 May 2006 20:16:47 UTC
W: Unable to stat ./video-
W: Unable to stat ./video-
W: Unable to stat ./video-
W: Unable to stat ./video-
W: Unable to stat ./video-
W: Unable to stat ./video-
MD5Sum:
836fee422b2348
21df94c6cb7764
a89da3024e1bad
SHA1:
54af1cbaa6d2da
b60102f0dc3294
8cd9015b53cb48
(Not sure how much this text box on the bug report page messes up the output above, but the problem is an empty line between "Date:" and the first "W:".)
The cause is this bit in ftparchive/
inline void NewLine(unsigned Priority)
{
if (ErrorPrinted == false && Quiet <= Priority)
{
cout << endl;
ErrorPrinted = true;
}
}
Although the warning messages themselves goes to stderr as they should, this padding newline is sent to stdout.
Workaround: Use apt-ftparchive -q -q
apt-utils is 0.6.40.1ubuntu10.
Changed in apt: | |
assignee: | gothicx → nobody |
Changed in apt: | |
assignee: | nobody → dereck |
milestone: | none → intrepid-alpha-6 |
status: | New → In Progress |
If this bug still happen with newer ubuntu release, please re-open it!