Add symlinks for git (shallow) tarballs when name differs due to mirror rewrite rules
v2 cover Add symlinks for git (shallow) tarballs when name differs due to mirror rewrite rules
v2: Check if fullmirror and shallow property exists before creating symlinks for them. This prevents errors with fetchers that don't support tarball creation.
The patches are based on master-next (5463c16e3619d324aed137f47f93f0997a227d29).
The git (shallow) tarballs are not found when certain mirror rewrite rules are in use. This is due to the fact that the tarball is named according to the url where it is downloaded from. The error occurs in the unpack step where BitBake looks for a tarball named after the url as specified in the recipe. By adding the symlinks BitBake finds the tarballs in the unpack step.
Regards
Urs
Urs Fässler (2):
fetch2: add symlinks for mirror tarballs
fetch2: add symlink for shallow mirror tarballs
lib/bb/fetch2/__init__.py | 6 +++ lib/bb/tests/fetch.py | 102 +++++++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 1 deletion(-)
Signature · 1 line
2.19.1
PATCH v2 1/2 fetch2: add symlinks for mirror tarballs
In the unpack step the mirror tarball is not found when the mirrored tarball is named differently than the original tarball. This happens due to mirror rewrite rules. To solve the problem we add symlinks for the differently named tarballs.
--- lib/bb/fetch2/__init__.py | 4 +++ lib/bb/tests/fetch.py | 58 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-)
lib/bb/fetch2/__init__.py +4 -0
@@ -1019,6 +1019,10 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): return origud.localpath # Otherwise the result is a local file:// and we symlink to it ensure_symlink(ud.localpath, origud.localpath) + + if hasattr(ud, "fullmirror") and os.path.exists(ud.fullmirror): + ensure_symlink(ud.fullmirror, origud.fullmirror) + update_stamp(origud, ld) return ud.localpath
lib/bb/tests/fetch.py +57 -1
94 lines not on this page · raw message
Signature · 1 line
2.19.1
PATCH v2 2/2 fetch2: add symlink for shallow mirror tarballs
In reply to Urs FässlerIn the unpack step the shallow mirror tarball is not found when the mirrored tarball is named differently than the original tarball. This happens due to mirror rewrite rules. To solve the problem we add symlinks for the differently named tarballs.
--- lib/bb/fetch2/__init__.py | 2 ++ lib/bb/tests/fetch.py | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+)
lib/bb/fetch2/__init__.py +2 -0
@@ -1022,6 +1022,8 @@ def try_mirror_url(fetch, origud, ud, ld, check = False): if hasattr(ud, "fullmirror") and os.path.exists(ud.fullmirror): ensure_symlink(ud.fullmirror, origud.fullmirror) + if hasattr(ud, "shallow") and ud.shallow and os.path.exists(ud.fullshallow): + ensure_symlink(ud.fullshallow, origud.fullshallow) update_stamp(origud, ld) return ud.localpath
lib/bb/tests/fetch.py +44 -0
53 lines not on this page · raw message
Signature · 1 line
2.19.1