mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
rootfs-postcommands.bbclass: Prevent linking testdata to itself
testdata and testdata_link may point to the same file, in particular when IMAGE_LINK_NAME and IMAGE_NAME are equal. Check if this is the case before creating a symlink that points to itself and makes the next build fail. (From OE-Core rev: b516394f9e7858062aa7b042aa4a1bdef9d3a941) Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
322985be23
commit
88a82e7489
@@ -300,7 +300,8 @@ python write_image_test_data() {
|
||||
searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/")
|
||||
export2json(d, testdata,searchString=searchString,replaceString="")
|
||||
|
||||
if os.path.lexists(testdata_link):
|
||||
os.remove(testdata_link)
|
||||
os.symlink(os.path.basename(testdata), testdata_link)
|
||||
if testdata_link != testdata:
|
||||
if os.path.lexists(testdata_link):
|
||||
os.remove(testdata_link)
|
||||
os.symlink(os.path.basename(testdata), testdata_link)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user