fetch2/git.py: fix update_mirror_links
ping
Quoted 41 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
We cannot assume ud has the same fetcher with origud. For example, if we set map
git://to file:// in PREMIRRORS, ud is using local fetcher and origud is using git fetcher. In such case, the ud does have the 'shallow' attribute. And we'll see the following error:Exception: AttributeError: 'FetchData' object has no attribute 'shallow'
Looking at the logic of this function, I think it's the origud's shallow that should be checked. So the logic becomes: if origud is using shallow and its full shallow tarball does not exist yet, symlink to ensure it exists. This should make more sense.
Signed-off-by Chen Qi <[email protected]>--- lib/bb/fetch2/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/bb/fetch2/git.py +1
-2@@ -359,7 +359,7 @@ class Git(FetchMethod): 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): + if origud.shallow and not os.path.exists(origud.fullshallow): self.ensure_symlink(ud.localpath, origud.fullshallow) def try_premirror(self, ud, d): -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#18656): https://lists.openembedded.org/g/bitbake-devel/message/18656
Mute This Topic: https://lists.openembedded.org/mt/116993661/3618072
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
ping
Quoted 47 lines · Chen Qi via lists.openembedded.org
ping
Quoted 30 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
We cannot assume ud has the same fetcher with origud. For example, if we set map
git://to file:// in PREMIRRORS, ud is using local fetcher and origud is using git fetcher. In such case, the ud does have the 'shallow' attribute. And we'll see the following error:Exception: AttributeError: 'FetchData' object has no attribute 'shallow'
Looking at the logic of this function, I think it's the origud's shallow that should be checked. So the logic becomes: if origud is using shallow and its full shallow tarball does not exist yet, symlink to ensure it exists. This should make more sense.
Signed-off-by Chen Qi <[email protected]>---
lib/bb/fetch2/git.py| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)lib/bb/fetch2/git.py +1
-1@@ -359,7 +359,7 @@ class Git(FetchMethod): 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): + if origud.shallow and not os.path.exists(origud.fullshallow): self.ensure_symlink(ud.localpath, origud.fullshallow)Quoted 4 lines
def
try_premirror(self, ud, d):-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18823): https://lists.openembedded.org/g/bitbake-devel/message/18823
Mute This Topic: https://lists.openembedded.org/mt/116993661/3618072
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 2 lines · Chen Qi via lists.openembedded.org
ping
Hi Chen,
Your patch is still in the queue, but the backlog is a bit big these days, particularly on the bitbake side. It will be reviewed in the coming weeks.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 12 lines · Mathieu Dubois-Briand
Quoted 2 lines · Chen Qi via lists.openembedded.org
ping
Hi Chen,
Your patch is still in the queue, but the backlog is a bit big these days, particularly on the bitbake side. It will be reviewed in the coming weeks.
Thanks,
Mathieu
Got it. Thanks for the info.
Regards,
Qi