All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/15] Make mirror replacement syntax explicit
@ 2025-02-05  7:15 Stefan Herbrechtsmeier
  2025-02-05  7:15 ` [RFC PATCH 01/15] fetch2: remove unnecessary expand function calls Stefan Herbrechtsmeier
                   ` (15 more replies)
  0 siblings, 16 replies; 30+ messages in thread
From: Stefan Herbrechtsmeier @ 2025-02-05  7:15 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Stefan Herbrechtsmeier

From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>


The mirror replacement syntax contains many implicit transformations.
The path of the URI always contains the base name of the downloaded
filename. This makes it impossible to rename or remove the base name of
the original path. It prevents upstream mirror for SRC_URIS with a
downloadfilename parameter. The base name of the downloaded filename
makes it impossible to use the download mirror for SRC_URIs with
subfolders in the downloadfilename parameter. Altogether the implicit
transformation complicates the understanding of the replacements.

This series adds an additional replacement named DOWNLOADFILENAME. This
replacement contains the relative filename of the downloaded file or
mirror archive for git and hg. This allows the user to explicitly define
the behavior. The usage is equivalent to the PATH replacement for the
sstate mirror from file to https scheme.

git://.*/.*  http://downloads.yoctoproject.org/mirror/sources/DOWNLOADFILENAME
https?://.*/.*  http://downloads.yoctoproject.org/mirror/sources/DOWNLOADFILENAME
file://.*  https://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH

Without a replacement variable the mirror will use the same base name as
the origin SRC_URI. This allows the usage of private package manager
registry together with a downloadfilename parameter or the rename of the
base name.

https://registry.npmjs.org/  https://example.com/npm/registry/
https://example.com/example/1.0.0.tgz  https://example.com/example/example-1.0.0.tgz

The series adds heuristics to keep a backward compatibility to common
styles. Because of the ambiguity of the old style, it is advisable to
remove this compatibility sooner or later to avoid unexpected behavior.


Stefan Herbrechtsmeier (15):
  fetch2: remove unnecessary expand function calls
  fetch2: local: use path variable
  fetch2: remove unnecessary unquote
  fetch2: ssh: use common localpath handling
  fetch2: clearcase: remove double DL_DIR from localfile
  fetch2: remove basepath from FetchData
  fetch2: remove basename from FetchData
  fetch2: use localpath instead of localfile
  fetch2: make DOWNLOADFILENAME and PATH explicit in mirrors
  tests: fetch: unify style of replaceuris in MirrorUriTest
  tests: fetch: fix nonsensical replaceuris in MirrorUriTest
  tests: fetch: reenable replaceuris in MirrorUriTest
  tests: fetch: comment and add replaceuris in MirrorUriTest
  tests: fetch: add npm mirrors replaceuris in MirrorUriTest
  tests: fetch: fix nonsensical mirror uris in FetcherNetworkTest

 lib/bb/fetch2/__init__.py  | 62 ++++++++++++++++++++------------------
 lib/bb/fetch2/az.py        |  8 ++---
 lib/bb/fetch2/clearcase.py |  2 --
 lib/bb/fetch2/gcp.py       |  8 -----
 lib/bb/fetch2/local.py     |  8 ++---
 lib/bb/fetch2/npm.py       |  2 +-
 lib/bb/fetch2/repo.py      |  2 +-
 lib/bb/fetch2/s3.py        |  7 -----
 lib/bb/fetch2/sftp.py      | 10 +-----
 lib/bb/fetch2/ssh.py       |  3 +-
 lib/bb/fetch2/wget.py      | 11 +------
 lib/bb/tests/fetch.py      | 62 ++++++++++++++++++++++++++++++++------
 12 files changed, 98 insertions(+), 87 deletions(-)

-- 
2.39.5



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2025-02-21 10:51 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05  7:15 [RFC PATCH 00/15] Make mirror replacement syntax explicit Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 01/15] fetch2: remove unnecessary expand function calls Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 02/15] fetch2: local: use path variable Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 03/15] fetch2: remove unnecessary unquote Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 04/15] fetch2: ssh: use common localpath handling Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 05/15] fetch2: clearcase: remove double DL_DIR from localfile Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 06/15] fetch2: remove basepath from FetchData Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 07/15] fetch2: remove basename " Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 08/15] fetch2: use localpath instead of localfile Stefan Herbrechtsmeier
2025-02-06 15:26   ` [bitbake-devel] " Richard Purdie
2025-02-06 16:21     ` Stefan Herbrechtsmeier
     [not found]     ` <1821AAFAC9C0AAD1.752@lists.openembedded.org>
2025-02-07  8:05       ` Stefan Herbrechtsmeier
2025-02-07  8:10         ` Richard Purdie
2025-02-07 12:48           ` Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 09/15] fetch2: make DOWNLOADFILENAME and PATH explicit in mirrors Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 10/15] tests: fetch: unify style of replaceuris in MirrorUriTest Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 11/15] tests: fetch: fix nonsensical " Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 12/15] tests: fetch: reenable " Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 13/15] tests: fetch: comment and add " Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 14/15] tests: fetch: add npm mirrors " Stefan Herbrechtsmeier
2025-02-05  7:15 ` [RFC PATCH 15/15] tests: fetch: fix nonsensical mirror uris in FetcherNetworkTest Stefan Herbrechtsmeier
2025-02-05 10:34 ` [bitbake-devel] [RFC PATCH 00/15] Make mirror replacement syntax explicit Richard Purdie
2025-02-05 12:12   ` Stefan Herbrechtsmeier
2025-02-20 10:22     ` Richard Purdie
2025-02-20 11:45       ` Stefan Herbrechtsmeier
2025-02-20 12:21         ` Richard Purdie
2025-02-20 17:37           ` Stefan Herbrechtsmeier
2025-02-20 22:00             ` Richard Purdie
2025-02-21 10:51               ` Stefan Herbrechtsmeier
     [not found]   ` <18214EC364EFB1B6.18160@lists.openembedded.org>
2025-02-05 12:30     ` Stefan Herbrechtsmeier

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.