<?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>16297</bug_id>
          
          <creation_ts>2026-05-22 13:48:03 +0000</creation_ts>
          <short_desc>Cannot set a git repo as a git premirror</short_desc>
          <delta_ts>2026-06-17 15:23:49 +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>6.0</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>6.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Antonin Godard">antonin.godard</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105551</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2026-05-22 13:48:03 +0000</bug_when>
    <thetext>I have internal mirrors of the yocto git repositories, but I can&apos;t use them in fetches using PREMIRRORS. My expectation was that setting a git: URL premirror to a git: server is that it would do a git fetch from the new location:

PREMIRRORS:prepend = &quot; \
    git://git.yoctoproject.org/.*     git://internal/mirrors/yoctoproject/ \
    git://git.openembedded.org/.*     git://internal/mirrors/openembedded/ \
    &quot;

This absolutely did the wrong thing and tried to clone git://internal/mirrors/yoctoproject.

Reading the source told me about magic symbols so I changed the line to

  git://git.yoctoproject.org/.* git://internal/mirrors/yoctoproject/BASENAME \

This mostly does the right thing, but it does use the mirror URL in the paths:

  Cloning into bare repository &apos;.../downloads/git2/internal.mirrors.yoctoproject.linux-yocto.git&apos;...

I initially started to file a bug before discovering BASENAME so now I&apos;m thinking we need to:
1) at least document the symbols better
2) consider if a git premirror should use the final or stated url as the filename</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105645</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-05-28 14:44:37 +0000</bug_when>
    <thetext>Antonin can you work with Ross to document this issue/limitation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105689</commentid>
    <comment_count>2</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-06-01 13:23:14 +0000</bug_when>
    <thetext>Patch sent to hopefully clarify this: https://lore.kernel.org/r/20260601-clarify-mirrors-syntax-v1-1-d9dbdbaf037f@bootlin.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105907</commentid>
    <comment_count>3</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-06-17 15:23:49 +0000</bug_when>
    <thetext>Patch merged: https://git.openembedded.org/bitbake/commit/?id=3a11c921a09c1495b5910f2411b79b4ea7a2aaf9</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>