<?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>5320</bug_id>
          
          <creation_ts>2013-10-04 16:57:09 +0000</creation_ts>
          <short_desc>Kernel patches not always applied</short_desc>
          <delta_ts>2014-07-21 16:34:17 +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>kernel</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kjellerstedt">peter.kjellerstedt</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>sgw</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <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>37646</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kjellerstedt">peter.kjellerstedt</who>
    <bug_when>2013-10-04 16:57:09 +0000</bug_when>
    <thetext>We have been experiencing a problem randomly where it seems a kernel patch we have is not applied and the build consequently fails. Today I finally managed to trigger it with BB_VERBOSE_LOGS enabled so that I could see what was happening while the kernel was being built. After a lot of debugging I think I finally understand what is going on and have managed to come up with a way to repeatedly recreate the problem.

Some preconditions:
* we use a custom kernel retrieved from our own Git server
* we have one patch specified in the SRC_URI
* KMETA is not set
* SRCREV_machine is set to a SHA-1 that matches the HEAD of origin/master of the kernel

If I first do a full &quot;bitbake core-image-minimal&quot; without any sstate cache, everything works as expected. In the kernel work directory I get a linux/.meta directory and the patch is applied as expected on the local master branch.

Then, to trigger the problem, all I need to do is:
* bitbake -f -c kernel_checkout &lt;our linux recipe&gt;
* bitbake -f -c patch &lt;our linux recipe&gt;

Doing this also triggers the validate_branches task before the patch task, which effectively reverts the local master back to the SHA-1 specified in SRCREV_machine, undoing what the previous patch task had done when originally building the kernel. However, the subsequent patch task does not recognize this and proceeds without doing anything as it thinks the patch is already applied...

I hope this is enough information for you to be able to recreate the problem, but I will be happy to provide any more information that you need.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37647</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-10-04 17:03:35 +0000</bug_when>
    <thetext>I have some recent experience with a similar issue. There&apos;s a fix I can propose, and a full
one in the 1.6 timeframe.

Can you temporarily set your SRCREV to AUTOREV and retry ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37752</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-10-08 17:48:31 +0000</bug_when>
    <thetext>setting to need info to get that test run. I haven&apos;t reproduced this locally, but still
trying to move this along.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42512</commentid>
    <comment_count>3</comment_count>
    <who name="Peter Kjellerstedt">peter.kjellerstedt</who>
    <bug_when>2014-04-10 11:28:08 +0000</bug_when>
    <thetext>We no longer need to patch the version of our kernel that we use, so I do not have a test case any more. However, I believe the problem is still there so I am reluctant to close the ticket...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42520</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2014-04-10 12:33:53 +0000</bug_when>
    <thetext>I&apos;m fine with leaving it open. We&apos;ll see if it pops up again.

(In reply to comment #3)
&gt; We no longer need to patch the version of our kernel that we use, so I do
&gt; not have a test case any more. However, I believe the problem is still there
&gt; so I am reluctant to close the ticket...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43663</commentid>
    <comment_count>5</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-05-29 15:19:05 +0000</bug_when>
    <thetext>Agreed to try to find a test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43668</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-05-29 15:31:28 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; We no longer need to patch the version of our kernel that we use, so I do
&gt; not have a test case any more. However, I believe the problem is still there
&gt; so I am reluctant to close the ticket...

Hi Peter, 
  This bug needs a test case to make any progress. Is it possible for you to create a testcase for this bug?

Thanks,
Nitin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44048</commentid>
    <comment_count>7</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2014-06-18 01:53:43 +0000</bug_when>
    <thetext>Can not reproduce it here. If someone can provide a testcase then reopen this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>