aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-11-12 14:21:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:07:19 +0000
commitf1a0a86ea2db6f16d9b643636a8973aaeb85e4a6 (patch)
tree7a121e8b497b26c6ac3deeef6fca066cc89d0c70 /meta/classes/license.bbclass
parent2be96279580eac2b03970131dcd81b13c7f7f7d5 (diff)
downloadopenembedded-core-f1a0a86ea2db6f16d9b643636a8973aaeb85e4a6.tar.gz
license.bbclass: Add function get_deployed_files
This function will get the files that were deployed using the sstate-control manifest file. This will give a better view of what was deployed next to the image. [YOCTO #6772] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index ff97098e2f..48d457e824 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -225,6 +225,21 @@ def get_boot_dependencies(d):
break
return depends
+def get_deployed_files(man_file):
+ """
+ Get the files deployed from the sstate manifest
+ """
+
+ dep_files = []
+ excluded_files = ["README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"]
+ with open(man_file, "r") as manifest:
+ all_files = manifest.read()
+ for f in all_files.splitlines():
+ if ((not (os.path.islink(f) or os.path.isdir(f))) and
+ not os.path.basename(f) in excluded_files):
+ dep_files.append(os.path.basename(f))
+ return dep_files
+
python do_populate_lic() {
"""
Populate LICENSE_DIRECTORY with licenses.