<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8395</bug_id>
          
          <creation_ts>2015-09-25 01:26:29 +0000</creation_ts>
          <short_desc>bitbake linux-yocto failed with &quot;do_patch&quot; after applied a kern-tool patch</short_desc>
          <delta_ts>2016-02-17 02:58:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="YONG LI">sdliyong</reporter>
          <assigned_to name="YONG LI">sdliyong</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54654</commentid>
    <comment_count>0</comment_count>
      <attachid>2769</attachid>
    <who name="YONG LI">sdliyong</who>
    <bug_when>2015-09-25 01:26:29 +0000</bug_when>
    <thetext>Created attachment 2769
The failed patch file

After applied the below patch, bitbake cannot apply these patches in my app layer. For example, there is a kernel patch in meta-app/recipes-kernel/linux-yocto/linux-yocto, I add the file in linux-yocto_%.bbappend file. bitbake yocto-linux will fail with &quot;do patch error&quot;. If I revert the patch, the build is okay. 


commit a03c100e813b1b5041bfc17c97f5bd4e72b795ad
Author: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
Date:   Mon Aug 31 15:55:33 2015 -0400
 
    patching: only validate user supplied patches by default
 
    Previously the patching tools would consider both system and user
    supplied patches in the same manner .. they are simply a series of
    patches to be applied to a branch, and that the scripts should determine
    where in the series to start (based on what is already on the branch).
 
    This detection was causing a few problems:
 
      - time consuming
      - starting in the middle of a series when intermediate patches were
        merged to a branch.
 
    To solve both the performance and start detection, we instead simply
    note the transition from system (i.e. already defined features and
    series) and user/recipe supplied patches. When the transition is noted,
    the system will start pushing ALL patches without doing autoresume
    detection.
 
    Control in keeping the series up to date is passed to the user, and
consistent behaviour/performance is achieved.
 
Signed-off-by: Bruce Ashfield bruce.ashfield@windriver.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54655</commentid>
    <comment_count>1</comment_count>
    <who name="YONG LI">sdliyong</who>
    <bug_when>2015-09-25 01:29:40 +0000</bug_when>
    <thetext>Below is the error message:
(1/3) 0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch
[INFO]: check of .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch with &quot;git am&quot; did not pass, trying reduced context.
[INFO]: Context reduced git-am of .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch with &quot;git am&quot; did not work, trying &quot;apply&quot;.
error: patch failed: drivers/staging/iio/magnetometer/hmc5843_core.c:592
error: drivers/staging/iio/magnetometer/hmc5843_core.c: patch does not apply
[ERROR]: Application of .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch failed.
         Patch needs to be refreshed. Sample resolution script:
             .git/rebase-apply/resolve_rejects
ERROR. could not update git tree</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54659</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2015-09-25 04:11:11 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Below is the error message:
&gt; (1/3) 0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch
&gt; [INFO]: check of
&gt; .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-
&gt; hmc5843-Set-iio-name-property-in-sysfs.patch with &quot;git am&quot; did not pass,
&gt; trying reduced context.
&gt; [INFO]: Context reduced git-am of
&gt; .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-
&gt; hmc5843-Set-iio-name-property-in-sysfs.patch with &quot;git am&quot; did not work,
&gt; trying &quot;apply&quot;.
&gt; error: patch failed: drivers/staging/iio/magnetometer/hmc5843_core.c:592
&gt; error: drivers/staging/iio/magnetometer/hmc5843_core.c: patch does not apply
&gt; [ERROR]: Application of
&gt; .kernel-meta/patches/standard/beaglebone/links/linux-yocto/0001-staging-iio-
&gt; hmc5843-Set-iio-name-property-in-sysfs.paotch failed.
&gt;          Patch needs to be refreshed. Sample resolution script:
&gt;              .git/rebase-apply/resolve_rejects
&gt; ERROR. could not update git tree

I don&apos;t see a problem. That patch is being rejected by git .. it *won&apos;t*
apply to the tree.

If this was working previously, it was somehow either being skipped, or
working by luck. The change that I made has nothing to do with the
actual application of the patch, it simply shortcuts already integrated
patches.

What kernel tree are you trying to apply this to ? Without that information,
I can&apos;t say more at the moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55203</commentid>
    <comment_count>3</comment_count>
    <who name="YONG LI">sdliyong</who>
    <bug_when>2015-10-13 01:02:42 +0000</bug_when>
    <thetext>I cannot reproduce this issue now. We can close it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56503</commentid>
    <comment_count>4</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-17 10:14:01 +0000</bug_when>
    <thetext>verified as not a bug</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2769</attachid>
            <date>2015-09-25 01:26:29 +0000</date>
            <delta_ts>2015-09-25 01:26:29 +0000</delta_ts>
            <desc>The failed patch file</desc>
            <filename>0001-staging-iio-hmc5843-Set-iio-name-property-in-sysfs.patch</filename>
            <type>application/octet-stream</type>
            <size>1179</size>
            <attacher name="YONG LI">sdliyong</attacher>
            
              <data encoding="base64">RnJvbSA4ZDA5ZjQ4YWRmZDI4MjE1N2Y2YWZjOTRkMjUwMmI0NDE1NmNiMTJmIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXJlayBCZWxpc2tvIDxtYXJla0Bnb2xkZWxpY28uY29tPgpE
YXRlOiBTYXQsIDI4IEZlYiAyMDE1IDIxOjU0OjQyICswMTAwClN1YmplY3Q6IFtQQVRDSF0gc3Rh
Z2luZzogaWlvOiBobWM1ODQzOiBTZXQgaWlvIG5hbWUgcHJvcGVydHkgaW4gc3lzZnMKCldpdGhv
dXQgdGhpcyBjaGFuZ2UgZmlsZSBuYW1lIGZvciBobWM1ODQzIGlzIGVtcHR5IGluCi9zeXMvYnVz
L2lpby9kZXZpY2VzL2lpb1w6ZGV2aWNlKi9uYW1lCgpXaXRoIHRoaXMgY2hhbmdlIG5hbWUgaXMg
cmVwb3J0ZWQgY29ycmVjdGx5OgpjYXQgL3N5cy9idXMvaWlvL2RldmljZXMvaWlvXDpkZXZpY2Uq
L25hbWUKaG1jNTg0MwoKU2lnbmVkLW9mZi1ieTogTWFyZWsgQmVsaXNrbyA8bWFyZWtAZ29sZGVs
aWNvLmNvbT4KU2lnbmVkLW9mZi1ieTogSm9uYXRoYW4gQ2FtZXJvbiA8amljMjNAa2VybmVs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