summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 601f5611cc..a34ea39493 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -145,7 +145,14 @@ def copy_license_files(lic_files_paths, destdir):
145 bb.utils.mkdirhier(destdir) 145 bb.utils.mkdirhier(destdir)
146 for (basename, path) in lic_files_paths: 146 for (basename, path) in lic_files_paths:
147 try: 147 try:
148 ret = shutil.copyfile(path, os.path.join(destdir, basename)) 148 src = path
149 dst = os.path.join(destdir, basename)
150 if os.path.exists(dst):
151 os.remove(dst)
152 if (os.stat(src).st_dev == os.stat(destdir).st_dev):
153 os.link(src, dst)
154 else:
155 shutil.copyfile(src, dst)
149 except Exception as e: 156 except Exception as e:
150 bb.warn("Could not copy license file %s: %s" % (basename, e)) 157 bb.warn("Could not copy license file %s: %s" % (basename, e))
151 158