<?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>14844</bug_id>
          
          <creation_ts>2022-06-20 09:30:13 +0000</creation_ts>
          <short_desc>SCM Mirror : Use Git mirror for fetching the Sources</short_desc>
          <delta_ts>2022-08-09 03:56:20 +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>3.1.15</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NIR 07/15</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.1.18</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ravi Vikkram">Vikkram.Ravi</reporter>
          <assigned_to name="Ravi Vikkram">Vikkram.Ravi</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</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>93554</commentid>
    <comment_count>0</comment_count>
    <who name="Ravi Vikkram">Vikkram.Ravi</who>
    <bug_when>2022-06-20 09:30:13 +0000</bug_when>
    <thetext>As We do develop software with multiple company collaboration, company A stores all the software Sources in GIT SCM and company B mirrors the repository in the their GIT SCM. The bb files reference the GIT SCM of the company A , the developers from the company B still fetch the source from the GIT SCM of the company A and not the mirror repository of the company B. 

Git mirroring is when a mirror copies the refs &amp; the remote-tracking branches. It is  functionally identical copy that is interchangeable with the original.

What did I try already :


PREMIRRORS_append += &quot;git://git@git.abc.a.com:8080/.* git://abc.b.com/repos/projects/k/.*\n&quot;

A premirror append always look for tar file of the source repository. 

Expectation:

I want to replace the domain name of the company A with the company B so that I could use both the repository in each of its domain.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93563</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-06-22 14:15:49 +0000</bug_when>
    <thetext>Can you give a little more information about why/how that failed?

In theory you should be able to setup a PREMIRROR entry as you describe. It would look for mirror tarballs but should also try the full url replacement as you want.

I assume you&apos;re using an older release and hence the &quot;_append&quot; syntax rather than &quot;:append&quot;? That syntax wouldn&apos;t work with 4.0.

We do various manipulations such as adding a ;protocol=https fallback for ;protocol=git:

https://git.yoctoproject.org/poky/tree/meta/classes/mirrors.bbclass#n76

so your case should be simpler and also work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93576</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-06-23 14:35:16 +0000</bug_when>
    <thetext>As per Richard&apos;s comments, need info state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93597</commentid>
    <comment_count>3</comment_count>
    <who name="Ravi Vikkram">Vikkram.Ravi</who>
    <bug_when>2022-06-24 05:56:24 +0000</bug_when>
    <thetext>I have updated the version of the Poky Distro version to 3.1.15</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93600</commentid>
    <comment_count>4</comment_count>
    <who name="Ravi Vikkram">Vikkram.Ravi</who>
    <bug_when>2022-06-27 09:43:00 +0000</bug_when>
    <thetext>I have added to the required information</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93601</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2022-06-27 18:57:34 +0000</bug_when>
    <thetext>Thanks for the additional information, it helps a lot to know this is dunfell. Even in dunfell, the MIRRORS entries I mentioned are present though:

https://git.yoctoproject.org/poky/tree/meta/classes/mirrors.bbclass?h=dunfell#n73

so in theory mapping two urls like that should work. 

We need to establish what exactly isn&apos;t working. Do you have a fetch log and PREMIRRORS entry which shows what is being attempted/not attempted you could share please?

In your example I notice that the domains, user, path and ports are different so it could be able one of these that is the trigger for an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93620</commentid>
    <comment_count>6</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-06-30 15:00:33 +0000</bug_when>
    <thetext>Ravi, see Richards comment and please reply.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93677</commentid>
    <comment_count>7</comment_count>
    <who name="Ravi Vikkram">Vikkram.Ravi</who>
    <bug_when>2022-07-18 14:52:54 +0000</bug_when>
    <thetext>The above solutions worked for me with the example shown in the bbclass. Thank you</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93730</commentid>
    <comment_count>8</comment_count>
    <who name="Ravi Vikkram">Vikkram.Ravi</who>
    <bug_when>2022-08-09 03:56:20 +0000</bug_when>
    <thetext>The solution does work on the version. Thanks . Hence I mark it as not a Bug</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>