Bug 1298110 - patch: **** Only garbage was found in the patch input.
Summary: patch: **** Only garbage was found in the patch input.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: patch
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1245310
TreeView+ depends on / blocked
 
Reported: 2016-01-13 09:22 UTC by Jan Synacek
Modified: 2016-01-13 14:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-13 14:18:52 UTC
Type: Bug


Attachments (Terms of Use)
purple-url-handler (11.50 KB, text/x-python)
2016-01-13 09:22 UTC, Jan Synacek
no flags Details
purple-url-handler.new (11.63 KB, text/plain)
2016-01-13 09:22 UTC, Jan Synacek
no flags Details
tmp.patch (515 bytes, patch)
2016-01-13 09:23 UTC, Jan Synacek
no flags Details | Diff

Description Jan Synacek 2016-01-13 09:22:23 UTC
Created attachment 1114342 [details]
purple-url-handler

Description of problem:
See steps to reproduce. I'm not sure if this is a bug in diffutils or patch...


Version-Release number of selected component (if applicable):
diffutils-3.3-12.fc23.x86_64
patch-2.7.5-2.fc23.x86_64


Steps to Reproduce:
1. diff purple-url-handler purple-url-handler.new  > tmp.patch
2. patch < tmp.patch
patch: **** Only garbage was found in the patch input.


Actual results:
Error.


Expected results:
Patch works.


Additional info:
It doesn't matter if the unified format is used or not. Also, the behavior is the same on RHEL-7.2 with diffutils-3.3-4.el7.x86_64 and patch-2.7.1-8.el7.x86_64.

Comment 1 Jan Synacek 2016-01-13 09:22:51 UTC
Created attachment 1114343 [details]
purple-url-handler.new

Comment 2 Jan Synacek 2016-01-13 09:23:34 UTC
Created attachment 1114344 [details]
tmp.patch

tmp.patch as it came out on my machine, in case it's needed.

Comment 3 Jan Synacek 2016-01-13 09:26:31 UTC
As bizzare as this may sound, I can't fix https://bugzilla.redhat.com/show_bug.cgi?id=1245310 because of this.

Comment 4 Tim Waugh 2016-01-13 12:48:32 UTC
Is there a reason you're not using diff's -u switch to specify that you want 'unified' format output?

When using diff with no options and two files are arguments, you'll get 'normal' format diff output with no filename header. This means you'll need to tell patch which file to apply the diff to. For example:

diff purple-url-handler purple-url-handler.new  > tmp.patch
patch purple-url-handler < tmp.patch

Comment 5 Jan Synacek 2016-01-13 14:18:52 UTC
Well, the problem seems to be between the chair and the machine... The patch works fine if applied manually, it just doesn't work when I'm building an rpm using fedpkg... Anyway, this is not a patch/diffutils bug. Sorry for the noise.


Note You need to log in before you can comment on or make changes to this bug.