[OE-core] [PATCH] package.bbclass: search for dangling links in installation directory

Chris Larson clarson at kergoth.com
Sun Oct 14 01:46:56 UTC 2012


On Sat, Oct 13, 2012 at 5:12 AM, Enrico Scholz
<enrico.scholz at sigma-chemnitz.de> wrote:
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 73c4358..30614f0 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1063,14 +1063,23 @@ python populate_packages () {
>                  path = os.path.join(root, f)
>                  rpath = path[len(inst_root):]
>                  pkg_files[pkg].append(rpath)
> +
> +                if not os.path.islink(path):
> +                    continue
> +
> +                target = os.readlink(path)
> +                if target[0] != '/':
> +                    # make path absolute relative to inst_root
> +                    target = os.path.join(root[len(inst_root):], target)
> +
> +                # make path absolute; do not use os.path.join() here
> +                # because target might start with multiple '/'
> +                rtarget = inst_root + target

I think you can use the join() which is in the oe python package for this.
-- 
Christopher Larson




More information about the Openembedded-core mailing list