<?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>15466</bug_id>
          
          <creation_ts>2024-04-04 14:20:30 +0000</creation_ts>
          <short_desc>devtool uses a gitsm URI for a version not using submodules if HEAD does</short_desc>
          <delta_ts>2024-08-08 15:10:35 +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>devtools / tool chain</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>5.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>alexandre.truong</reporter>
          <assigned_to>alexandre.truong</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tim.orling</cc>
    
    <cc>vincent</cc>
    
    <cc>yoann.congal</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>98690</commentid>
    <comment_count>0</comment_count>
    <who name="">alexandre.truong</who>
    <bug_when>2024-04-04 14:20:30 +0000</bug_when>
    <thetext>devtool&apos;s submodule detection seems to check HEAD for sub-modules but not the version we&apos;re asking.

Link to a patch to workaround this in the test-suite (test_devtool_add_git_style2)
:
https://lists.openembedded.org/g/openembedded-core/message/197961

In the test, the mbedtls repo is used and triggered this with this patch on the development branch (the main one):
https://github.com/Mbed-TLS/mbedtls/commit/456a54da8ef44c8b725b524567c08cffec6a7214
The test asks for the 3.1.0 version which does not contain sub-modules.

How to reproduce the problem:
devtool add --version v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git;protocol=https
# We should have git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master
 we get gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98749</commentid>
    <comment_count>1</comment_count>
    <who name="Vincent Kriek">vincent</who>
    <bug_when>2024-04-14 19:15:57 +0000</bug_when>
    <thetext>This is not an issue with devtool not setting the correct URI for a version, but the --version not being used for anything else but setting the &quot;PV&quot; value in the recipe. The version it will check out from git will be the same as if no version is specified.

If I add mbedtls by doing: 
&gt; devtool add --srcrev v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git

it checks out the correct tag and sets the SRC_URI as expected.
&gt; SRC_URI = &quot;git://git@github.com/ARMmbed/mbedtls.git;protocol=ssh;branch=master&quot;

To fix this issue I ould change the command to set both the --srcrev and the --version:
&gt; devtool add --srcrev v3.1.0 --version v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98923</commentid>
    <comment_count>2</comment_count>
    <who name="">alexandre.truong</who>
    <bug_when>2024-04-26 08:36:27 +0000</bug_when>
    <thetext>Patches sent:
https://lists.openembedded.org/g/openembedded-core/topic/patch_2_2/105746806
https://lists.openembedded.org/g/openembedded-core/topic/patch_1_2_revert/105746807</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98927</commentid>
    <comment_count>3</comment_count>
    <who name="">alexandre.truong</who>
    <bug_when>2024-04-26 10:17:33 +0000</bug_when>
    <thetext>Link to the v2 of the patches:
https://lists.openembedded.org/g/openembedded-core/message/198719
https://lists.openembedded.org/g/openembedded-core/message/198720</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99525</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-08-08 15:10:35 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/log/?qt=range&amp;q=731f47ecfd8ad6558aac629806810789c623986b

and follow commit.

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>