<?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>9351</bug_id>
          
          <creation_ts>2016-03-29 13:49:47 +0000</creation_ts>
          <short_desc>Issues using bitbake with externalsrc and git</short_desc>
          <delta_ts>2016-08-22 08:59:52 +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>BitBake</product>
          <component>bitbake</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>normal</bug_severity>
          <target_milestone>2.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cliff Brake">cbrake</reporter>
          <assigned_to name="Markus Lehtonen">markus.lehtonen</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</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>60488</commentid>
    <comment_count>0</comment_count>
    <who name="Cliff Brake">cbrake</who>
    <bug_when>2016-03-29 13:49:47 +0000</bug_when>
    <thetext>Hi,

We would like to use bitbake with externalsrc recipes such that we can:

* specify nobranch=1 in SRC_URI
* SRCREV = &quot;${AUTOREV}&quot;
* SRCPV = HEAD of externalsrc workspace

Currently, SRCPV = git revision of the branch (default is master) which may or may not match what is actually built in the externalsrc directory.  An additional issue is that you might change the git version to a different tag, and bitbake won&apos;t rebuild the recipe unless the git version of the branch specified changes.

See this email thread for discussion: http://thread.gmane.org/gmane.comp.handhelds.openembedded.core/78333

Thanks,
Cliff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62281</commentid>
    <comment_count>1</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-05-18 09:29:45 +0000</bug_when>
    <thetext>First, it seems that there&apos;s a slight misunderstanding regarding externalsrc. In your case, &quot;inherit externalsrc&quot; actually has no effect at all. The externalsrc bbclass is supposed to be used in conjunction with defining EXTERNALSRC variable which is supposed to points to source tree. Externalsrc is meant (AFAIU) for building a recipe with user-specific modified local source tree, e.g. for quicker development/hacking. It is a bit hackish, e.g. it involves disabling build tasks, mangling SRC_URI etc and I wouldn&apos;t probably use it for production. At least that&apos;s how externalsrc is currently designed to work. Thus, you could drop this inherit statement altogether.

But, then, to the actual and real problem which you see. How I see it, you should be able to just do what you tried, i.e. something like (from your example):
SRCREV = &quot;${AUTOREV}&quot;
PV = &quot;1.4+gitr${SRCPV}&quot;
PR = &quot;r1&quot;
SRC_URI = &quot;git://${FILE_DIRNAME};protocol=file;branch=HEAD;nobranch=1&quot;


I&apos;ll send a patch to make this possible. Let&apos;s see what the response will be.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62282</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-05-18 10:18:23 +0000</bug_when>
    <thetext>Patch sent for review:
http://lists.openembedded.org/pipermail/bitbake-devel/2016-May/007475.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64835</commentid>
    <comment_count>3</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-03 14:07:48 +0000</bug_when>
    <thetext>Re-based and re-sent:
https://patchwork.openembedded.org/patch/128407/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65334</commentid>
    <comment_count>4</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-19 06:00:36 +0000</bug_when>
    <thetext>A different solution under review:
https://patchwork.openembedded.org/series/1763/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65385</commentid>
    <comment_count>5</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-08-22 08:59:52 +0000</bug_when>
    <thetext>Fixed in bitbake master:
http://git.openembedded.org/bitbake/commit/?id=2673fac5a9d06de937101e3fb2ddf1e60ff99abf

Use the new &apos;usehead=1&apos; url parameter in order to build HEAD.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>