[OE-core] [PATCHv3 5/6] license.bbclass: Add function get_deployed_files

Paul Eggleton paul.eggleton at linux.intel.com
Fri Nov 20 02:33:50 UTC 2015


On Thursday 19 November 2015 14:25:18 mariano.lopez at linux.intel.com wrote:
> From: Mariano Lopez <mariano.lopez at linux.intel.com>
> 
> 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 at linux.intel.com>
> ---
>  meta/classes/license.bbclass | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index f012783..dbec4d7 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):
> +    """
> +    This will 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 = "%s %s" % (dep_files, os.path.basename(f))
> +    return dep_files

As per get_boot_dependencies(), best to return a proper list here.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list