[haiku-development] OK -- I must be really stupid...

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Wed, 25 May 2011 16:07:49 -0700

... but I can *never* make patch work!

I have to recreate my modified usb_midi sources, having just done swn update.
I have a patch file usb_midi.diff, containing patches to various files,
the first few lines being:

Index: src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h
===================================================================
--- src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h (revision 40241)
+++ src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h (working copy)

So in the parent directory of that path, I do

  patch <usb_midi.diff

and get:

can't find file to patch at input line 5
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h
|===================================================================
|--- src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h        (revision 40241)
|+++ src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h        (working copy)
--------------------------
File to patch:
 

Of course if I do
  ls src/add-ons/kernel/drivers/midi/usb_midi/usb_midi.h
the file is in fact there, so I can't see why I should need any '-p' option.
(I've tried various values with no success.)

So WTF?

Please tell me where my stupidity lies... 

        -- Pete --


Other related posts: