All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: bitbake-devel@lists.openembedded.org, alex.kanavin@gmail.com
Subject: Re: [bitbake-devel] [PATCH v2 1/1] fetch2: try_mirror_url(): Skip invalid local url
Date: Tue, 12 Aug 2025 11:50:14 +0800	[thread overview]
Message-ID: <d749943b-dc5f-4ac8-9d31-01a8b99be2f0@windriver.com> (raw)
In-Reply-To: <e56a4f7e3c7bff7b86cecc32c2fcd43a63db0620.1754925741.git.liezhi.yang@windriver.com>



On 8/11/25 23:41, Robert Yang via lists.openembedded.org wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
> 
> There can be multiple PREMIRRORs each PREMIRROR contains specifics sources for
> each layer, each recipe will try the PREMIRRORs one by one until succeed, but
> the trying would be failed if the PREMIRROR doesn't contain the required
> sources, so return it immediately to make log.do_fetch clean, and tt also can
> fix a warning when BB_GIT_SHALLOW and is enabled and failed to fetch the source
> from the PREMIRROR:
> 
> Fast shallow clone failed, try to skip fast mode now.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>   bitbake/lib/bb/fetch2/__init__.py | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index 0ad987c596..1bab8f7f57 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -1067,6 +1067,10 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
>       # Return of None or a value means we're finished
>       # False means try another url
>   
> +    # Skip fetching it when the local url's path doesn't exist
> +    if ud.parm.get('protocol', '') == 'file' and not os.path.exists(ud.path):

Sorry, this patch is incorrect, I need check repo and repo.git because git works 
with or without .git suffix. Will send a V3 for it.

// Robert

> +        return False
 > +>       if ud.lockfile and ud.lockfile != origud.lockfile:
>           lf = bb.utils.lockfile(ud.lockfile)
>   
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#17861): https://lists.openembedded.org/g/bitbake-devel/message/17861
> Mute This Topic: https://lists.openembedded.org/mt/114649737/7304958
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [liezhi.yang@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



      reply	other threads:[~2025-08-12  3:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 15:41 [PATCH v2 0/1] fetch2: try_mirror_url(): Skip invalid local url liezhi.yang
2025-08-11 15:41 ` [PATCH v2 1/1] " liezhi.yang
2025-08-12  3:50   ` Robert Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d749943b-dc5f-4ac8-9d31-01a8b99be2f0@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.