I’ve recently updated grab-attachments in ubuntu-dev-tools so that it can grab even more attachments. I happened to be looking at initramfs-tools bug reports and noticed an apport package installation failure due to the fact that /boot ran out of free space. While I could, and did, write a bug pattern blocking further reports regarding this issue I suspected that a similar error would appear in bug attachments besides ‘DpkgTerminalLog.txt’.
So I modified grab-attachments to take a package argument which will make it download all the attachments for all the open bug reports with a task about the specified package. With the initramfs-tools example I used it like so:
grab-attachments --package initramfs-tools
Then using find and zgrep to search the attachments:
find . -type f -print0 | xargs -0 zgrep 'gzip: stdout: No space left on device'
I discovered that this error message also appeared in ‘VarLogDistupgradeApttermlog.gz’ and ‘VarLogDistupgradeTermlog.gz’. Subsequently, I was able to write bug patterns for all three attachments that might include the error message and consolidate the already reported bugs into two separate ones. There are two bug reports - one for update-manager and one for initramfs-tools. Additionally, reviewing the bug reports was a lot easier when I had already downloaded all the attachments!
As you can see with grab-attachments and apport bug patterns I was able make quite a dent in the initramfs-tools bug reports.