<?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>10415</bug_id>
          
          <creation_ts>2016-10-12 01:44:16 +0000</creation_ts>
          <short_desc>devtool: add: override preferred kernel when a new one is added</short_desc>
          <delta_ts>2017-12-06 17:12:20 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.5</target_milestone>
          <dependson>11102</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Juan Manuel Cruz Alcaraz">juan.m.cruz.alcaraz</assigned_to>
          <cc>leonardo.sandoval.gonzalez</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67161</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-12 01:44:16 +0000</bug_when>
    <thetext>If you use devtool add on a kernel source tree, a kernel recipe is generated based on the one in meta-skeleton. However in order to actually build that, PREFERRED_PROVIDER_virtual/kernel needs to be changed. If we&apos;re not inside the eSDK then we can just display a warning, but within the eSDK the configuration is controlled so we can just change it within the tool. Presumably we&apos;d only want to allow having one kernel recipe in the workspace at a time though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67162</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-12 01:48:42 +0000</bug_when>
    <thetext>A further thought - we might want to implement this generically for any configured PREFERRED_PROVIDER rather than just doing it specifically for PREFERRED_PROVIDER_virtual/kernel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70921</commentid>
    <comment_count>2</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-02-23 17:45:55 +0000</bug_when>
    <thetext>bug 11102 must be completed in order to fully test this enhancement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70925</commentid>
    <comment_count>3</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-02-23 18:25:36 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; A further thought - we might want to implement this generically for any
&gt; configured PREFERRED_PROVIDER rather than just doing it specifically for
&gt; PREFERRED_PROVIDER_virtual/kernel.

Paul, at least for the kernel, this is the proposed patch

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lsandov1/devtool-override-prefered-kernel


This is done on the add plugin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73993</commentid>
    <comment_count>4</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2017-06-12 16:11:15 +0000</bug_when>
    <thetext>The dependency is not complete yet, so moving it to next milestone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75012</commentid>
    <comment_count>5</comment_count>
    <who name="Jose Lamego">jose.a.lamego</who>
    <bug_when>2017-07-13 16:31:30 +0000</bug_when>
    <thetext>Paul: can you elaborate on why setting PREFERRED_PROVIDER should be done in other place rather than at the add plugin as Leo&apos;s proposal? (scripts/lib/devtool/standard.py)

So far, I manually included the missing directory mentioned in bug 11102 to be able to test Leo&apos;s patch and it allows to successfully create the recipe with devtool add and then remove it using devtool reset (solves the errors &quot;Nothing PROVIDES &apos;ly2&apos;&quot;, &quot;ly2 was skipped: Set PREFERRED_PROVIDER_virtual/kernel to ly2 to enable it&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75199</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-07-20 15:48:03 +0000</bug_when>
    <thetext>It&apos;s not about where it is set, it&apos;s about handling the generic PREFERRED_PROVIDER mechanism rather than doing it specifically for PREFERRED_PROVIDER_virtual/kernel. I would suggest iterating over the items in PROVIDES and then check if PREFERRED_PROVIDER for each one is set to a value that it is different to PN for the recipe we are dealing with.

BTW, the proposed patch cannot work, it sets PREFERRED_PROVIDER_virtual/kernel in a bbappend which will not take effect. In order to work this needs to be set at the configuration level.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>