<?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>10252</bug_id>
          
          <creation_ts>2016-09-09 11:00:38 +0000</creation_ts>
          <short_desc>Suggested small note to avoid confusion re. the version specification in PREFERRED_VERSION</short_desc>
          <delta_ts>2016-09-14 12:18:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>9</classification_id>
          <classification>Documentation</classification>
          <product>Reference</product>
          <component>handbook</component>
          <version>2.2</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>14 Sept 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>poky.doc.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>srifenbark</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65980</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-09-09 11:00:38 +0000</bug_when>
    <thetext>Hello,

When using PREFERRED_VERSION, the version specified is matched against PV rather than the recipe filename. This is subtle and easy to miss.

I suggest adding the following note before the paragraph that starts with &quot;sometimes the PREFERRED_VERSION variable...&quot;:

  Note {
  The specified version is matched against PV, which does not necessarily match
  the version part of the recipe&apos;s filename. For example, consider two recipes
  foo_1.2.3.bb and foo_git.bb where foo_git.bb contains the following assignment:
  
    PV = &quot;1.2.2+git{SRCPV}&quot;  
  
  In this case, the correct way to select foo_git.bb is with an assignment like
  the following:
  
    PREFERRED_VERSION_foo = &quot;1.2.2+git%&quot;
  
  The following assignment will *not* work:
  
    PREFERRED_VERSION_foo = &quot;git&quot;
  }


Cheers,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65982</commentid>
    <comment_count>1</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-09-09 11:07:54 +0000</bug_when>
    <thetext>Missed a $. Here&apos;s a fixed version (with shorter version strings too). :P

  Note {
  The specified version is matched against PV, which does not necessarily match
  the version part of the recipe&apos;s filename. For example, consider two recipes
  foo_1.2.bb and foo_git.bb where foo_git.bb contains the following assignment:
  
    PV = &quot;1.1+git${SRCPV}&quot;  
  
  In this case, the correct way to select foo_git.bb is with an assignment like
  the following:
  
    PREFERRED_VERSION_foo = &quot;1.1+git%&quot;
  
  The following assignment will *not* work:
  
    PREFERRED_VERSION_foo = &quot;git&quot;
  }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66095</commentid>
    <comment_count>2</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-09-13 18:43:22 +0000</bug_when>
    <thetext>Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-PREFERRED_VERSION for the new note.

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66100</commentid>
    <comment_count>3</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-09-13 19:15:15 +0000</bug_when>
    <thetext>Looks good to me!

Thanks,
Ulf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66133</commentid>
    <comment_count>4</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-09-14 12:18:34 +0000</bug_when>
    <thetext>Thanks, 

Setting to RESOLVED and putting the doc flag to &quot;done.&quot;

Scott</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>