From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@openembedded.org
Subject: [RFC] granular library packaging
Date: Mon, 06 Oct 2008 16:00:44 +0200 [thread overview]
Message-ID: <gcd5mc$5hl$1@ger.gmane.org> (raw)
Hi,
I tried to come up with a way to make splitting up library packages a
bit easier an used this in the opencv recipe:
python populate_packages_prepend () {
cv_libdir = bb.data.expand('${libdir}', d)
cv_libdir_dbg = bb.data.expand('${libdir}/.debug', d)
do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV
%s development package', extra_depends='${PN}-dev', allow_links=True)
do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV
%s development package', extra_depends='${PN}-dev')
do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s
development package', extra_depends='${PN}-dev')
do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s
library', extra_depends='', allow_links=True)
}
FILES_${PN} = "${bindir}"
FILES_${PN}-dbg += "${libdir}/.debug"
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
The advantages of this:
* all libs get their own package
* .so, .a and .la files end up in the right package
* lib<foo>-dev depends on the headers in ${PN}-dev keeping the depchains
intact
The downsides:
* populate_packages_prepend runs *before* do_strip, so there's on big
-dbg package to rule them all
* doesn't handle granular pkgconfig files.
I had a chat with Richard about it and we agreed that this needs some
more thought, especially wrt depencies and granular packaging. My
motivation for splitting things is to make using gdb less space-heavy
due to pulling in a huge -dbg package that depends on extra, unneeded
libs. As I pointed out above, that is sadly the case here since do_strip
runs too late.
So, what are your opinions on splitting -dev and -dbg packages and would
something like this be acceptable to put in lib_package.bbclass?
Note that a regexp based FILES is a related, but different discussion.
regards,
Koen
next reply other threads:[~2008-10-06 14:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-06 14:00 Koen Kooi [this message]
2008-10-06 15:03 ` [RFC] granular library packaging Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gcd5mc$5hl$1@ger.gmane.org' \
--to=k.kooi@student.utwente.nl \
--cc=openembedded-devel@lists.openembedded.org \
--cc=openembedded-devel@openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.