diff options
| -rw-r--r-- | meta/classes/staging.bbclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index b97f26127f..1fe60ac2cb 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
| @@ -260,9 +260,11 @@ def staging_copyfile(c, target, fixme, postinsts, stagingdir): | |||
| 260 | if os.path.islink(c): | 260 | if os.path.islink(c): |
| 261 | linkto = os.readlink(c) | 261 | linkto = os.readlink(c) |
| 262 | if os.path.lexists(dest): | 262 | if os.path.lexists(dest): |
| 263 | if not os.path.islink(dest): | ||
| 264 | raise OSError(errno.EEXIST, "Link %s already exists as a file" % dest, dest) | ||
| 263 | if os.readlink(dest) == linkto: | 265 | if os.readlink(dest) == linkto: |
| 264 | return dest | 266 | return dest |
| 265 | bb.fatal("Link %s already exists to a different location?" % dest) | 267 | raise OSError(errno.EEXIST, "Link %s already exists to a different location? (%s vs %s)" % (dest, os.readlink(dest), linkto), dest) |
| 266 | os.symlink(linkto, dest) | 268 | os.symlink(linkto, dest) |
| 267 | #bb.warn(c) | 269 | #bb.warn(c) |
| 268 | else: | 270 | else: |
| @@ -331,7 +333,10 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d): | |||
| 331 | if l.endswith("/"): | 333 | if l.endswith("/"): |
| 332 | staging_copydir(l, targetdir, stagingdir) | 334 | staging_copydir(l, targetdir, stagingdir) |
| 333 | continue | 335 | continue |
| 334 | staging_copyfile(l, targetdir, fixme, postinsts, stagingdir) | 336 | try: |
| 337 | staging_copyfile(l, targetdir, fixme, postinsts, stagingdir) | ||
| 338 | except FileExistsError: | ||
| 339 | continue | ||
| 335 | 340 | ||
| 336 | staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d) | 341 | staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d) |
| 337 | for p in postinsts: | 342 | for p in postinsts: |
