public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Changqing Li <changqing.li@windriver.com>
To: Changqing Li <changqing.li@eng.windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] base.bbclass: make do_fetch depends on PREMIRRORS MIRRORS
Date: Mon, 15 Apr 2024 16:44:55 +0800	[thread overview]
Message-ID: <64109c74-a8b0-4fc4-98c8-ddd4f0356fdd@windriver.com> (raw)
In-Reply-To: <17C666E056927DBC.10598@lists.openembedded.org>

[-- Attachment #1: Type: text/plain, Size: 2232 bytes --]


On 4/15/24 16:30, Changqing Li wrote:
> From: Changqing Li<changqing.li@windriver.com>
>
> When there are tarballs in local mirrorfile://, do_fetch will
> create symlink under DL_DIR, eg:
> pseudo-prebuilt-2.33.tar.xz -> /project/path/to/localmirrorA/pseudo-prebuilt-2.33.tar.xz
> after user update path from localmirrorA to localmirrorB, because
> do_fetch don't depends on PREMIRRORS/MIRRORS, do_fetch will not
> be rerun, so the symlink will not update to:
> pseudo-prebuilt-2.33.tar.xz -> /project/path/to/localmirrorB/pseudo-prebuilt-2.33.tar.xz
> then, do_upack will failed since the tarball cannot be found.
>
> Signed-off-by: Changqing Li<changqing.li@windriver.com>
> ---
>   meta/classes-global/base.bbclass | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
> index 0999b42daa..5094a1540e 100644
> --- a/meta/classes-global/base.bbclass
> +++ b/meta/classes-global/base.bbclass
> @@ -139,6 +139,7 @@ do_fetch[file-checksums] ="${@bb.fetch.get_checksum_file_list(d)}"
>   do_fetch[file-checksums] += " ${@get_lic_checksum_file_list(d)}"
>   do_fetch[prefuncs] += "fetcher_hashes_dummyfunc"
>   do_fetch[network] = "1"
> +do_fetch[vardeps] += "PREMIRRORS MIRRORS"
>   python base_do_fetch() {
>   
>       src_uri = (d.getVar('SRC_URI') or "").split()

This fix has a shortcoming,  it will make do_fetch rerun in some 
unnecessary cases, eg:

PREMIRRORS changed from

PREMIRRORS = "git://.*/.* https://downloads.yoctoproject.org/mirror/sources"

to
PREMIRRORS = "git://.*/.* 
https://downloads.yoctoproject.org/mirror/sources \

ftp://.*/.* https://downloads.yoctoproject.org/mirror/sources ".


Any better suggestion? Thanks.

Regards

Sandy


>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#198222):https://lists.openembedded.org/g/openembedded-core/message/198222
> Mute This Topic:https://lists.openembedded.org/mt/105532159/3616873
> Group Owner:openembedded-core+owner@lists.openembedded.org
> Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub  [changqing.li@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>

[-- Attachment #2: Type: text/html, Size: 5459 bytes --]

       reply	other threads:[~2024-04-15  8:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <17C666E056927DBC.10598@lists.openembedded.org>
2024-04-15  8:44 ` Changqing Li [this message]
2024-04-15  8:30 [PATCH] base.bbclass: make do_fetch depends on PREMIRRORS MIRRORS changqing.li
2024-04-15  8:35 ` [OE-core] " Martin Jansa
2024-04-15 10:05 ` Richard Purdie
2024-04-16  1:48   ` Changqing Li
2024-04-16  7:30     ` Alexander Kanavin
2024-04-17  9:04       ` Changqing Li
2024-04-17  9:13     ` Richard Purdie

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=64109c74-a8b0-4fc4-98c8-ddd4f0356fdd@windriver.com \
    --to=changqing.li@windriver.com \
    --cc=changqing.li@eng.windriver.com \
    --cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox