From: Scott Weaver <weaverjs@gmail.com>
To: Kai <kai.kang@windriver.com>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel][ 1/3] bitbake: fetch2: fix premirror URI when downloadfilename defined
Date: Mon, 27 Sep 2021 22:00:19 -0400 [thread overview]
Message-ID: <YVJ3M8RII6ssdf8/@popos> (raw)
In-Reply-To: <dd26626a-079e-86d8-34ce-ad5d2b71ac8b@windriver.com>
On 21-09-22 09:58:13, Kai wrote:
> On 9/6/21 6:27 AM, Scott Weaver wrote:
> > When downloadfilename is defined in a recipe's SRC_URI and PREMIRRORS is also
> > defined using the same URI, the downloadfilename is appended to the mirror
> > URI and it should not be.
> >
> > [YOCTO #13039]
>
> As I commented in the bugzilla, I suppose it is an invalid bug.
>
> It save the tarball with the name of the value of downloadfilename rather
> than the basename of the url.
> In this case, the name of tarball in the premirror downloads/ directory is
> uthash-2.0.2.tar.gz rather than
> 2.0.2.tar.gz if the premirror is created by run bitbake do_fetch. So when
> premirror is used, it checks
> uthash-2.0.2.tar.gz in the premirrors but not the original value
> '2.0.2.tar.gz'.
>
> With this patch, it fails to fetch the tarball from premirrors. It could be
> reproduced by config:
>
> BB_NO_NETWORK = "1"
> BB_FETCH_PREMIRRORONLY = "1"
>
> Regards,
> Kai
Sorry, Kai. I didn't see your email until just now.
I'll look into it. IMO, I would treat this like a new/different bug
than the one I addressed with this patch but regardless it is a
related use case to this BZ.
I'll update the BZ after I've dug into this.
- Scott
> >
> > Signed-off-by: Scott Weaver <weaverjs@gmail.com>
> > ---
> > bitbake/lib/bb/fetch2/__init__.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> > index 914fa5c024..47a4943369 100644
> > --- a/bitbake/lib/bb/fetch2/__init__.py
> > +++ b/bitbake/lib/bb/fetch2/__init__.py
> > @@ -466,7 +466,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
> > # Kill parameters, they make no sense for mirror tarballs
> > uri_decoded[5] = {}
> > elif ud.localpath and ud.method.supports_checksum(ud):
> > - basename = os.path.basename(ud.localpath)
> > + basename = os.path.basename(uri_decoded[loc])
> > if basename and not result_decoded[loc].endswith(basename):
> > result_decoded[loc] = os.path.join(result_decoded[loc], basename)
> > else:
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#12592): https://lists.openembedded.org/g/bitbake-devel/message/12592
> > Mute This Topic: https://lists.openembedded.org/mt/85401309/3616933
> > Group Owner: bitbake-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [kai.kang@windriver.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
> --
> Kai Kang
> Wind River Linux
>
--
- Scott
next prev parent reply other threads:[~2021-09-28 2:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 22:27 [bitbake-devel][0/3] BZ#13039: updates to fetch2 and tests/fetch Scott Weaver
2021-09-05 22:27 ` [bitbake-devel][ 1/3] bitbake: fetch2: fix premirror URI when downloadfilename defined Scott Weaver
2021-09-22 1:58 ` kai
2021-09-28 2:00 ` Scott Weaver [this message]
2021-10-14 9:01 ` Robert Yang
2021-10-15 6:37 ` ChenQi
[not found] ` <16AE2029FEDEE475.7161@lists.openembedded.org>
2021-10-15 6:40 ` ChenQi
2021-09-05 22:27 ` [bitbake-devel][ 2/3] bitbake: tests/fetch: add downloadfilename tests Scott Weaver
2021-09-05 22:27 ` [bitbake-devel][ 3/3] bitbake: tests/fetch: add and fix npm tests Scott Weaver
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=YVJ3M8RII6ssdf8/@popos \
--to=weaverjs@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=kai.kang@windriver.com \
/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.