bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Scott Weaver <weaverjs@gmail.com>, bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel][RFC][PATCH] bitbake: fetch2: correct PREMIRROR URI
Date: Mon, 30 Aug 2021 21:37:34 +0100	[thread overview]
Message-ID: <381bd257581076645eb07f4bbc42d62fd92d6d17.camel@linuxfoundation.org> (raw)
In-Reply-To: <20210830035630.3634069-1-weaverjs@gmail.com>

On Sun, 2021-08-29 at 23:56 -0400, Scott Weaver wrote:
> When downloadfilename is defined in a recipe's SRC_URI and a PREMIRROR is also
> defined for that URI, the downloadfilename is appended to the mirror URI and it
> should not be appended.
> 
> Three new fetch bitbake-selftest tests were added to test downloadfilename
> scenarios.
> 
> [YOCTO #13039]
> 
> Signed-off-by: Scott Weaver <weaverjs@gmail.com>
> ---
> 
> This fix is for BZ13039.
> 
> downloadfilename is defined as "the filename used when storing the downloaded
> file" under the definition of SRC_URI [1].
> This definition appears to be echoed in 44.3.2 where it says downloadfilename
> "allows the name of the downloaded file to be specified" [2]. Although, the
> second definition isn't as clear and could be interpreted to mean that the
> name of the file to be downloaded can be specified. Which, if intentional,
> would not match the first definition.
> 
> I believe that the first definition is the correct definition of
> downloadfilename.
> 
> I've added three new tests to bitbake-selftest's fetch testsuite.
> 
> Executed against the master branch, the following new tests fail (see patch):
> 
> test_fetch_premirror_specify_downloadfilename_regex_uri() fails because
> the fetcher attempts to download the downloadfilename.
> 
> test_fetch_premirror_specify_downloadfilename_specific_uri() was added
> to address BZ13039 and is expected to fail.
> 
> These tests pass when executed with this patch applied.
> 
> However, this change breaks the test that I have commented out in the patch
> which is executed by MirrorUriTest.test_urireplace.
> I don't believe this is a valid test because a mirror is normally the location
> where an artifact can be found and should not specify the filename itself.

I'm afraid I have to disagree on that.

If someone specifies a full URL in a mirror definition, they expect it to map to
that specific url. We need to find a way to fix your corner case but keep
complete mappings working.

Cheers,

Richard




  reply	other threads:[~2021-08-30 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30  3:56 [bitbake-devel][RFC][PATCH] bitbake: fetch2: correct PREMIRROR URI Scott Weaver
2021-08-30 20:37 ` Richard Purdie [this message]
2021-08-30 23:51   ` 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=381bd257581076645eb07f4bbc42d62fd92d6d17.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=weaverjs@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).