<?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>6881</bug_id>
          
          <creation_ts>2014-10-23 22:31:29 +0000</creation_ts>
          <short_desc>git fetcher does not support lightweight tags</short_desc>
          <delta_ts>2015-03-12 10:57:28 +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>1.6.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>TC needed</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jesse Gilles">jgilles</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>andrei</cc>
    
    <cc>holger.behrens</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Costin">costin.c.constantin</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>46551</commentid>
    <comment_count>0</comment_count>
    <who name="Jesse Gilles">jgilles</who>
    <bug_when>2014-10-23 22:31:29 +0000</bug_when>
    <thetext>Bitbake 1.22 (daisy) does not support using lightweight git tags for SRCREV or in SRC_URI.  Bitbake 1.20 (dora) handled lightweight tags just fine, so this seems to be a regression.

Example below writing a recipe for a ruby-serialport repo on github.com.

Specifying the tag in the SRC_URI used to work, but no longer does:
SRC_URI = &quot;git://github.com/hparra/ruby-serialport.git;protocol=git;tag=v1.1.0&quot;
(SRCREV unset)

Setting it in SRCREV instead also fails:
SRCREV = &quot;v1.1.0&quot;
SRC_URI = &quot;git://github.com/hparra/ruby-serialport.git;protocol=git&quot;

The workaround is to get the SHA hash for the commit the tag references and use that, but it would be nice if this worked again.

# tag v1.1.0
SRCREV = &quot;709e385f6d20aaadc7f3252af59250336d27e607&quot;

Error when using tag name in SRCREV or SRC_URI
----------------------------------------------
ERROR: Function failed: Fetcher failure for URL: &apos;git://github.com/hparra/ruby-serialport.git;protocol=git;tag=v1.1.0&apos;. The command git ls-remote git://github.com/hparra/ruby-serialport.git refs/heads/v1.1.0 refs/tags/v1.1.0^{} gave empty output unexpectedly</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46942</commentid>
    <comment_count>1</comment_count>
    <who name="Andrei Gherzan">andrei</who>
    <bug_when>2014-11-12 13:24:39 +0000</bug_when>
    <thetext>Confirm issue on dizzy branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47818</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-08 21:03:51 +0000</bug_when>
    <thetext>Patch on the bitbake list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47934</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-15 15:02:49 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=83a30dfd495f0b8e90b7b5725c946c659ecbd93d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47942</commentid>
    <comment_count>4</comment_count>
    <who name="Jesse Gilles">jgilles</who>
    <bug_when>2015-01-15 15:51:12 +0000</bug_when>
    <thetext>Thanks for the fix -- any chance this could be backported to daisy?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49395</commentid>
    <comment_count>5</comment_count>
    <who name="Costin">costin.c.constantin</who>
    <bug_when>2015-03-12 10:48:03 +0000</bug_when>
    <thetext>Hello,

Tested on master and it works (poky hash: 0aff27522d467ee5d02289594207ddef4add7081):

Build Configuration:
BB_VERSION        = &quot;1.25.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-14.10&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.7+snapshot-20150312&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:0aff27522d467ee5d02289594207ddef4add7081&quot;

...

cosscat@ubnt:/media/yp_builds/poky$ cat meta/recipes-tests/ruby-serialport/ruby-serialport_1.2.3.bb
DESCRIPTION=&quot;just a recipe test&quot;

LICENSE=&quot;GPLv3&quot;
SRC_URI = &quot;git://github.com/hparra/ruby-serialport.git;protocol=git;rev=v1.2.3&quot;
#SRCREV = &quot;v1.2.3&quot;
#Tested both ways: with SRCREV variable and without

S = &quot;${WORKDIR}/git&quot;


Marking as verified.

Costin</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>