diff options
| -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 8ad4614d61..c714da31f4 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
| @@ -185,6 +185,16 @@ def copy_license_files(lic_files_paths, destdir): | |||
| 185 | os.remove(dst) | 185 | os.remove(dst) |
| 186 | if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev): | 186 | if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev): |
| 187 | os.link(src, dst) | 187 | os.link(src, dst) |
| 188 | try: | ||
| 189 | os.chown(dst,0,0) | ||
| 190 | except OSError as err: | ||
| 191 | import errno | ||
| 192 | if err.errno == errno.EPERM: | ||
| 193 | # suppress "Operation not permitted" error, as | ||
| 194 | # sometimes this function is not executed under pseudo | ||
| 195 | pass | ||
| 196 | else: | ||
| 197 | raise | ||
| 188 | else: | 198 | else: |
| 189 | shutil.copyfile(src, dst) | 199 | shutil.copyfile(src, dst) |
| 190 | except Exception as e: | 200 | except Exception as e: |
