On Wed, 2011-12-21 at 23:55 -0800, Saul Wold wrote:
> +             exec_prefix = d.getVar('exec_prefix', True)
> +             sysroot_path = d.getVar('STAGING_DIR_TARGET', True)
> +             sysroot_path_usr = sysroot_path + exec_prefix
> +
> +             try:
> +                     ldd_output = sub.check_output(["prelink-rtld", 
> "--root", sysroot_path, path])
> +             except sub.CalledProcessError as e:
> +                     if e.returncode != 127:
> +                             error_msg = pn + ": prelink-rtld aborted when 
> processing %s" % path
> +                             
> package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
> +                             return False
> +                     else:
> +                             # Sometimes this is done deliberately (e.g, 
> e2fsprogs), so only warn
> +                             bb.warn("%s has missing library dependencies" % 
> path)
> +                             return
> +             if sysroot_path_usr in ldd_output:
> +                     error_msg = pn + ": %s links to something under 
> exec_prefix" % path
> +                     
> package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
> +                     error_msg = "ldd reports: %s" % ldd_output
> +                     
> package_qa_handle_error("unsafe-references-in-binaries", error_msg, d)
> +                     return False

Is that going to do the right thing if ${prefix} == ${exec_prefix}?
It's not obvious to me that it will handle that case correctly.

p.



_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to