<?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>10699</bug_id>
          
          <creation_ts>2016-11-21 21:49:20 +0000</creation_ts>
          <short_desc>Ensure consistency in repository URLs</short_desc>
          <delta_ts>2026-08-20 15:19:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Layer Index</product>
          <component>Layer Index</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Tim Orling">tim.orling</assigned_to>
          <cc>adityags2004</cc>
    
    <cc>akhilathota499</cc>
    
    <cc>akuster</cc>
    
    <cc>brian.avery</cc>
    
    <cc>Falital</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>tim.orling</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>68471</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-21 21:49:20 +0000</bug_when>
    <thetext>Two layers can fetch from the same repository, but be using different URLs to fetch it e.g. git://github.com/project/repo and https://github.com/project/repo. We should have a mechanism to avoid this happening because it not only  wastes fetching time and space, it may also cause problems for scripts making use of the data.

Not all git servers have a standardised mapping between the different protocol URLs, so we&apos;ll probably need to have a table (possibly in the database) that we can populate with mappings for known URLs. The mapping would be done when the entry is submitted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92969</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2022-04-10 19:27:58 +0000</bug_when>
    <thetext>NOTE: git://github.com/ URLs are no longer allowed by GitHub.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101535</commentid>
    <comment_count>2</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2025-03-30 12:41:28 +0000</bug_when>
    <thetext>My idea to fix this would be allow the fetcher to remap url based on a variable:

Example:

BB_URL_REMAP = &quot;git://github.com/openembedded/bitbake git://git.openembedded.org/bitbake&quot;

Will change all url starting with &quot;git://github.com/openembedded/bitbake&quot; to &quot;git://git.openembedded.org/bitbake&quot;

A variable called BB_ALLOW_URL_REMAP can be used to disable this feature if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101883</commentid>
    <comment_count>3</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2025-05-05 19:00:22 +0000</bug_when>
    <thetext>I added a commit to support this see https://lists.openembedded.org/g/bitbake-devel/topic/patch_bitbake_fetch_add/112636148</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102003</commentid>
    <comment_count>4</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2025-05-20 17:14:16 +0000</bug_when>
    <thetext>It seems I misunderstood this so I will move it back to new.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104539</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-03-05 16:27:44 +0000</bug_when>
    <thetext>Bumping to 6.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105365</commentid>
    <comment_count>6</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-07 05:29:07 +0000</bug_when>
    <thetext>I would like to work on this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105486</commentid>
    <comment_count>7</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-19 07:04:32 +0000</bug_when>
    <thetext>Looking at the discussions it looks like a patch is created and this bug is fixed. can I know Is this bug fixed, or needs a patch to be created?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105489</commentid>
    <comment_count>8</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2026-05-19 11:44:12 +0000</bug_when>
    <thetext>Hi Aditya, 

See https://lists.yoctoproject.org/g/docs/topic/bitbake_devel_patch/112640014
The patch is not valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105490</commentid>
    <comment_count>9</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-19 11:51:39 +0000</bug_when>
    <thetext>Hi Sawas,
I haven&apos;t started working on this bug since I am a newcomer I am searching for newcomer bugs to fix so that I get deeper understanding in yocto things.
I haven&apos;t submitted any patch yet on this bug, my question is since I saw this comment-on-comment history 
&quot;I added a commit to support this see https://lists.openembedded.org/g/bitbake-devel/topic/patch_bitbake_fetch_add/112636148&quot;
I need to know if this bug is fixed or needs to be worked on.

Thanks,
Aditya GS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105491</commentid>
    <comment_count>10</comment_count>
    <who name="Sawas Etairidis">Falital</who>
    <bug_when>2026-05-19 12:04:18 +0000</bug_when>
    <thetext>Hi Aditya GS,

I am not working on this, as far as I know this is not fixed.

Regards,
Savvas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105502</commentid>
    <comment_count>11</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-20 10:33:56 +0000</bug_when>
    <thetext>I will try to fix this,
The issue was reproduced by fetching the same repository using
two different URL formats:

    git://github.com/git/git
    https://github.com/git/git/archive/master.tar.gz

BitBake treats these URLs as different sources and performs
separate fetch operations, resulting in duplicate downloads:

    downloads/git2/github.com.git.git
    downloads/master.tar.gz

This shows that BitBake does not normalize equivalent repository
URLs, leading to inconsistent caching behavior and redundant
fetch operations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105516</commentid>
    <comment_count>12</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-21 11:02:52 +0000</bug_when>
    <thetext>Reproduced the issue and verified that the same repository can be fetched
multiple times when accessed via different URL forms.

Observed that BitBake treats git:// URLs and HTTP tarball URLs using
different fetchers and storage mechanisms, resulting in separate downloads:

    git repositories stored under downloads/git2/
    tarball downloads stored directly under downloads/

Attempted a normalization approach in FetchData, but this does not resolve
the issue since different fetch backends are used.

This suggests that a more fundamental change may be required, such as
normalizing repository identity at a higher level or improving fetch key
generation logic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105517</commentid>
    <comment_count>13</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-21 11:04:58 +0000</bug_when>
    <thetext>At this point, I am moving on from this bug as it appears to require a
more in-depth design change beyond a simple fix.

Thanks,
Aditya GS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105519</commentid>
    <comment_count>14</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-21 11:27:16 +0000</bug_when>
    <thetext>I also attempted an approach based on canonicalizing the repository URL
(e.g., deriving a common identity such as github.com/git/git), with the
intention of treating equivalent URLs as the same source.

However, this did not resolve the issue, since BitBake continues to use
the full URL (including protocol and parameters) for fetch key generation
and cache handling. As a result, different URL forms are still treated as
distinct sources and result in separate downloads.

This suggests that canonicalization at the FetchData level alone is
insufficient, and that resolving the issue would require changes at a
higher level, such as in fetch key computation or DL_DIR handling.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105520</commentid>
    <comment_count>15</comment_count>
      <attachid>5219</attachid>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-05-21 11:34:42 +0000</bug_when>
    <thetext>Created attachment 5219
Tried canonical approach

Submitting an exploratory patch introducing canonical repository
identification (canonical_id) in FetchData.

Testing shows this approach does not eliminate duplicate fetches,
as BitBake still uses full URLs for fetch key generation.

Sharing for discussion and feedback on whether canonicalization
should be handled at a higher level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105763</commentid>
    <comment_count>16</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2026-06-06 19:48:48 +0000</bug_when>
    <thetext>I don&apos;t think we want to change the bitbake fetcher itself.

The fix for this should be related to/part of:

#16272
#16240</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105768</commentid>
    <comment_count>17</comment_count>
    <who name="Aditya G S">adityags2004</who>
    <bug_when>2026-06-08 05:39:11 +0000</bug_when>
    <thetext>Hi Tim,

Thanks for the clarification.

Based on the discussion and your feedback, it makes sense that this
issue is better handled at a higher level rather than modifying the
BitBake fetcher directly.

Since this overlaps with broader design aspects covered in #16272 and
#16240, I will step back from this bug for now and focus on other
issues more suitable for my current experience level.

Thanks for the guidance.

Regards,
Aditya</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5219</attachid>
            <date>2026-05-21 11:34:42 +0000</date>
            <delta_ts>2026-05-21 11:34:42 +0000</delta_ts>
            <desc>Tried canonical approach</desc>
            <filename>0001-fetch2-add-canonical-repository-identity-for-URL-nor.patch</filename>
            <type>text/plain</type>
            <size>2191</size>
            <attacher name="Aditya G S">adityags2004</attacher>
            
              <data encoding="base64">RnJvbSBkMDRkMDc3YTY4NjRlZmI0YmU4MWRlMmNmZTk4ODE5ODFlMWY3N2Q4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBBZGl0eWEgRyBTIDxhZGl0eWFnczIwMDRAZ21haWwuY29tPgpE
YXRlOiBUaHUsIDIxIE1heSAyMDI2IDE3OjAwOjE1ICswNTMwClN1YmplY3Q6I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zdW0uRmlsZUNoZWNrc3VtQ2FjaGUoKQpA
QCAtMTMyNCw2ICsxMzMyLDggQEAgY2xhc3MgRmV0Y2hEYXRhKG9iamVjdCk6CiAgICAgICAgIChz
ZWxmLnR5cGUsIHNlbGYuaG9zdCwgc2VsZi5wYXRoLCBzZWxmLnVzZXIsIHNlbGYucHN3ZCwgc2Vs
Zi5wYXJtKSA9IGRlY29kZXVybChkLmV4cGFuZCh1cmwpKQogICAgICAgICBzZWxmLmRhdGUgPSBz
ZWxmLmdldFNSQ0RhdGUoZCkKICAgICAgICAgc2VsZi51cmwgPSB1cmwKKyAgICAgICAgc2VsZi5j
YW5vbmljYWxfaWQgPSBjYW5vbmljYWxfcmVwb19pZCh1cmwpCisKICAgICAgICAgaWYgbm90IHNl
bGYudXNlciBhbmQgInVzZXIiIGluIHNlbGYucGFybToKICAgICAgICAgICAgIHNlbGYudXNlciA9
IHNlbGYucGFybVsidXNlciJdCiAgICAgICAgIGlmIG5vdCBzZWxmLnBzd2QgYW5kICJwc3dkIiBp
biBzZWxmLnBhcm06Ci0tIAoyLjM0LjEKCg==
</data>
<flag name="review"
          id="27"
          type_id="3"
          status="?"
          setter="adityags2004"
          requestee="adityags2004"
    />
          </attachment>
      

    </bug>

</bugzilla>