diff options
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index a7f377361c..ba95c9ac84 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -350,6 +350,16 @@ def copy_license_files(lic_files_paths, destdir): | |||
350 | os.remove(dst) | 350 | os.remove(dst) |
351 | if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev): | 351 | if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev): |
352 | os.link(src, dst) | 352 | os.link(src, dst) |
353 | try: | ||
354 | os.chown(dst,0,0) | ||
355 | except OSError as err: | ||
356 | import errno | ||
357 | if err.errno == errno.EPERM: | ||
358 | # suppress "Operation not permitted" error, as | ||
359 | # sometimes this function is not executed under pseudo | ||
360 | pass | ||
361 | else: | ||
362 | raise | ||
353 | else: | 363 | else: |
354 | shutil.copyfile(src, dst) | 364 | shutil.copyfile(src, dst) |
355 | except Exception as e: | 365 | except Exception as e: |