how to install/package debug version of library *not* in /usr/lib64/.debug?


Robert P. J. Day
 

just got an interesting request from a colleague ... for reasons i
will explain shortly, it's necessary to build both the normal and
debug versions of a library, but for the debug version to be installed
in any directory other than one where the final pathname component is
".debug".

the reason is that yocto is used for the first part of the build
process, but the final result is then grabbed by an internal packaging
system that promptly untar's the YP-generated rootfs, and does a bunch
more proprietary post-processing, and one of those unskippable steps
is to manually delete the directory /usr/lib64/.debug/, so the request
is, if the recipe is for "fubar-dbg", then it's fine if that
debug-enabled shared library is installed under, say,
/usr/lib64/fubar-dbg/ (or whatever they choose to call that last
pathname component, as long as it's not ".debug").

i'm sure there are simple do_package_append() or do_install_append()
functions that would do it; i took a look at package.bbclass, and
noticed the split_and_strip_files() routine, with the snippet:

if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory':
# Single debug-file-directory style debug info
debugappend = ".debug"
debugstaticappend = ""
debugdir = ""
debugstaticdir = ""
debuglibdir = "/usr/lib/debug"
debugstaticlibdir = "/usr/lib/debug-static"
debugsrcdir = "/usr/src/debug"

with the setting of "debuglibdir", but in our case, the dest dir is
/usr/lib64 (although symlinks might make that distinction irrelevant,
i'd have to check).

am i overthinking this? what's the cleverest way to do this? (hoping
i've described this sufficiently clearly.)

rday

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.