diff options
Diffstat (limited to 'meta/classes/uninative.bbclass')
-rw-r--r-- | meta/classes/uninative.bbclass | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass index a410647328..670efa9f05 100644 --- a/meta/classes/uninative.bbclass +++ b/meta/classes/uninative.bbclass @@ -63,7 +63,19 @@ python uninative_event_fetchloader() { fetcher.download() localpath = fetcher.localpath(srcuri) if localpath != tarballpath and os.path.exists(localpath) and not os.path.exists(tarballpath): + # Follow the symlink behavior from the bitbake fetch2. + # This will cover the case where an existing symlink is broken + # as well as if there are two processes trying to create it + # at the same time. + if os.path.islink(tarballpath): + # Broken symbolic link + os.unlink(tarballpath) + + # Deal with two processes trying to make symlink at once + try: os.symlink(localpath, tarballpath) + except FileExistsError: + pass cmd = d.expand("\ mkdir -p ${UNINATIVE_STAGING_DIR}-uninative; \ |