aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-10-02 16:30:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-10-04 18:25:06 +0100
commitdc81df215cc94c279991df35125d94770a1bc3d2 (patch)
treef3eea7f218cbec3d7b6642446e6482aa48957e9e /meta
parentcd6041071ddf76693cda7632379ceddd1d21a7fb (diff)
downloadopenembedded-core-contrib-dc81df215cc94c279991df35125d94770a1bc3d2.tar.gz
license.bbclass: use shutil instead of bb.utils.copyfile
bb.utils.copyfile is for a specific purpose and more complicated than needed here, so just use shutil.copyfile. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/license.bbclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 0160313e2e..6abdae4e84 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -128,12 +128,14 @@ def add_package_and_files(d):
d.setVar('RRECOMMENDS_' + pn, "%s" % (pn_lic))
def copy_license_files(lic_files_paths, destdir):
+ import shutil
+
bb.utils.mkdirhier(destdir)
for (basename, path) in lic_files_paths:
- ret = bb.utils.copyfile(path, os.path.join(destdir, basename))
- # If the copy didn't occur, something horrible went wrong and we fail out
- if not ret:
- bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % path)
+ try:
+ ret = shutil.copyfile(path, os.path.join(destdir, basename))
+ except Exception as e:
+ bb.warn("Could not copy license file %s: %s" % (basename, e))
def find_license_files(d):
"""