title: Bitbake recipe not applying patch as expected
body: <p>I have a tarball src.tar.gz whose contents are unpacked into src/ and a patch of this sources generated with this command:</p>
  
  <pre><code>$ diff -Nurp src/ src_mod/ &gt; my.patch
  </code></pre>
  
  <p>The patch header starts with this three lines:</p>
  
  <pre><code> diff -Nurp src/path/to/file src_PATCHED/path/to/file
   --- src/path/to/file  2012-10-22 05:52:59.000000000 +0200
   +++ src_PATCHED/path/to/file  2016-03-14 12:27:52.892802283 +0100
  </code></pre>
  
  <p>My bitbake recipe references both path and tarball files using this SRC_URI:</p>
  
  <pre><code>SRC_URI = " \
      file://my.patch \
      file://src.tar.gz \
  "
  </code></pre>
  
  <p>do_fetch and do_unpack tasks work as expected, leaving my.patch and src/ inside ${S} directory, that is:</p>
  
  <pre><code>${S}/my.path
  ${S}/src.tar.gz
  </code></pre>
  
  <p>But do_patch task is failing with this ERROR message:</p>
  
  <pre><code>ERROR: Command Error: exit status: 1  Output:
  Applying patch my.patch
  can't find file to patch at input line 4
  Perhaps you used the wrong -p or --strip option?
  </code></pre>
  
  <p>I have tested different alternatives, for example setting "patchdir" attribute like showed below:</p>
  
  <pre><code>SRC_URI = " \
      file://my.patch;patchdir=${S}/src \
      file://src.tar.gz \
  "
  </code></pre>
  
  <p>I expected "patchdir" being the same as using "patch -d dir". But it doesn't work as expected, it always returns the same ERROR message. </p>
  
  <p>What I am doing wrong?</p>