mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 00:32:12 +02:00
bitbake: fetch2: Ensure a valid symlink in PREMIRRORS case when using shallow cloning
- Since `ud.path` contains in that case the `PREMIRRORS` prefix path, this change ensures that a correct symlink is set up. (Bitbake rev: 37ed18e45aa17406162efc5ee3ddb2d6b33d07b9) Signed-off-by: Stefan Koch <stefan-koch@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
0e9ce41a1c
commit
f5ae37fbd8
@@ -348,6 +348,13 @@ class Git(FetchMethod):
|
||||
def tarball_need_update(self, ud):
|
||||
return ud.write_tarballs and not os.path.exists(ud.fullmirror)
|
||||
|
||||
def update_mirror_links(self, ud, origud):
|
||||
super().update_mirror_links(ud, origud)
|
||||
# When using shallow mode, add a symlink to the original fullshallow
|
||||
# path to ensure a valid symlink even in the `PREMIRRORS` case
|
||||
if ud.shallow and not os.path.exists(origud.fullshallow):
|
||||
self.ensure_symlink(ud.localpath, origud.fullshallow)
|
||||
|
||||
def try_premirror(self, ud, d):
|
||||
# If we don't do this, updating an existing checkout with only premirrors
|
||||
# is not possible
|
||||
|
||||
Reference in New Issue
Block a user