Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 388017

Summary: Bugzilla sends malformed patches in some cases
Product: Gentoo Infrastructure Reporter: Michał Górny <mgorny>
Component: BugzillaAssignee: Bugzilla Admins <bugzilla>
Status: RESOLVED DUPLICATE    
Severity: major CC: ulm
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-10-21 17:35:55 UTC
$ wget 'https://bugs.gentoo.org/attachment.cgi?id=287485&action=diff&context=patch&collapsed=&headers=1&format=raw'

and you'll notice that the created .patch file doesn't contain any added lines, just removals. You'll also notice the line counts don't match. That's because bugzie, for some reason, removed all lines starting with '++'.

'Accept' or 'User-Agent' may be relevant, as Opera gets correct patch contents.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-10-21 17:36:52 UTC
(In reply to comment #0)
> 'Accept' or 'User-Agent' may be relevant, as Opera gets correct patch contents.

Hrm, my bad. I must've been using another URL. With this one, it doesn't.
Comment 2 Alex Legler (RETIRED) archtester gentoo-dev Security 2011-10-21 17:53:06 UTC
The URL you're quoting is the "Raw Unified Diff" output of Bugzilla. You may not assume this returns the same contents as the raw attachment.

The issue is known. At any rate, you should be using the standard attachment URL (reachable from the attachment display page via the "View" link).

*** This bug has been marked as a duplicate of bug 251286 ***