uri_replace not working prooperly
I ran into a problem yesterday (which prompted the previous email I sent about lockfile and ENAMETOOLONG) that was triggered by the uri_replace code.
Specifically patches:
96c30007dc0b32eee2b15771daec7948bc9bfd97
fetch2: fix downloadfilename issue with premirror
and
8a3ff9f3eaf19d4258eb070c5dc230dface269b2
bitbake: fetch2: fix premirror URI when downloadfilename defined
(The former works to resolve an issue with the later.)
What is happening is the uri_mirror can (and should) adjust it's own mirror urls in a pattern. However, something is going catastrophically wrong and ends up generating this long entry:
Quoted 8 lines
DEBUG: For url ['http', 'petalinux.xilinx.com', '/sswreleases/rel-v2022.1/downloads/git2_git.qemu.org.git.seabios.git..tar.gz', '', '',
OrderedDict()] comparing ['svn', '.*' , '/.*', '', '',OrderedDict()] to ['https', 'downloads.yoctoproject.org', '/mirror/sources/', '', '',OrderedDict()]
DEBUG: For url ['https', 'downloads.yoctoproject.orggit2_git.qemu.org.git.seabios.git..tar.gz', '/git2_git.qemu.org.git.seabios.git..tar.gzmgit2_git.qemu.org.git.seabios.git ..tar.gzigit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzogit2_git.qemu.org.git.seabios.git..tar .gzrgit2_git.qemu.org.git.seabios.git..tar.gz/git2_git.qemu.org.git.seabios.git..tar.gzsgit2_git.qemu.org.git.seabios.git..tar.gzogit2_git.qemu.org.git.seabios.git..tar.gzug it2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzcgit2_git.qemu.org.git.seabios.git..tar.gzegit2_git.qemu.org.git.seabios.git..tar.gzsgit2_g it.qemu.org.git.seabios.git..tar.gz/git2_git.qemu.org.git.seabios.git..tar.gz', '', '',OrderedDict()] comparing ['ftp', '.*', '/.*', '', '',OrderedDict()] to ['http', 'pet alinux.xilinx.com', '/sswreleases/rel-v2022.1/downloads', '', '',OrderedDict()]
(later line repeats for each type..)
The end result of this is that the locking code attemtps to lock a file with the name: git2_git.qemu.org.git.seabios.git..tar.gzmgit2_git.qemu.org.git.seabios.git..tar.gzigit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzogit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gz/git2_git.qemu.org.git.seabios.git..tar.gzsgit2_git.qemu.org.git.seabios.git..tar.gzogit2_git.qemu.org.git.seabios.git..tar.gzugit2_git.qemu.org.git.seabios.git..tar.gzrgit2_git.qemu.org.git.seabios.git..tar.gzcgit2_git.qemu.org.git.seabios.git..tar.gzegit2_git.qemu.org.git.seabios.git..tar.gzsgit2_git.qemu.org.git.seabios.git..tar.gz_git2_git.qemu.org.git.seabios.git..tar.gz
Which needless to say is way way way too long.
I'm working to find a way to reproduce this issue outside of our internal configuration. (as you can see what is being referenced is all public urls, so it's just a matter of me building a reproducer.)
The odd thing, if I do a -c cleanall on the recipe, and retry it then works fine. So it may also have some issue with other tasks running at the same time.
If I can figure out a solid reproducer for this (even if it's complex), I'll reply to this with the details.
--Mark