diff options
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r-- | meta/classes/license.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index f85d4f9bcf..d659b767c5 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
@@ -150,12 +150,12 @@ def copy_license_files(lic_files_paths, destdir): | |||
150 | dst = os.path.join(destdir, basename) | 150 | dst = os.path.join(destdir, basename) |
151 | if os.path.exists(dst): | 151 | if os.path.exists(dst): |
152 | os.remove(dst) | 152 | os.remove(dst) |
153 | if (os.stat(src).st_dev == os.stat(destdir).st_dev): | 153 | if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev): |
154 | os.link(src, dst) | 154 | os.link(src, dst) |
155 | else: | 155 | else: |
156 | shutil.copyfile(src, dst) | 156 | shutil.copyfile(src, dst) |
157 | except Exception as e: | 157 | except Exception as e: |
158 | bb.warn("Could not copy license file %s: %s" % (basename, e)) | 158 | bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e)) |
159 | 159 | ||
160 | def find_license_files(d): | 160 | def find_license_files(d): |
161 | """ | 161 | """ |