From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [RFC][PATCH 1/4] package.bbclass: move reading shlibs providers to separate function
Date: Wed, 28 Aug 2013 10:33:39 +0200 [thread overview]
Message-ID: <20130828083339.GI3544@jama> (raw)
In-Reply-To: <1373152387-19393-1-git-send-email-Martin.Jansa@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3355 bytes --]
On Sun, Jul 07, 2013 at 01:13:04AM +0200, Martin Jansa wrote:
> * prepare for reading shlibs providers only from dependency tree of
> current recipe
>
> [YOCTO #4628]
Any comment on this patchset?
I'm using first 3 commits for some time in world builds and they helped
me to discover some unexpected shlib providers (and fix them by setting
PRIVATE_LIBS).
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> meta/classes/package.bbclass | 43 +++++++++++++++++++++++--------------------
> 1 file changed, 23 insertions(+), 20 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 5c2d1c6..d80535d 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1337,6 +1337,28 @@ python package_do_shlibs() {
> # Take shared lock since we're only reading, not writing
> lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
>
> + def read_shlib_providers:
> + list_re = re.compile('^(.*)\.list$')
> + # Go from least to most specific since the last one found wins
> + for dir in reversed(shlibs_dirs):
> + if not os.path.exists(dir):
> + continue
> + for file in os.listdir(dir):
> + m = list_re.match(file)
> + if m:
> + dep_pkg = m.group(1)
> + fd = open(os.path.join(dir, file))
> + lines = fd.readlines()
> + fd.close()
> + ver_file = os.path.join(dir, dep_pkg + '.ver')
> + lib_ver = None
> + if os.path.exists(ver_file):
> + fd = open(ver_file)
> + lib_ver = fd.readline().rstrip()
> + fd.close()
> + for l in lines:
> + shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
> +
> def linux_so(file):
> needs_ldconfig = False
> cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(file) + " 2>/dev/null"
> @@ -1479,26 +1501,7 @@ python package_do_shlibs() {
> postinst += d.getVar('ldconfig_postinst_fragment', True)
> d.setVar('pkg_postinst_%s' % pkg, postinst)
>
> - list_re = re.compile('^(.*)\.list$')
> - # Go from least to most specific since the last one found wins
> - for dir in reversed(shlibs_dirs):
> - if not os.path.exists(dir):
> - continue
> - for file in os.listdir(dir):
> - m = list_re.match(file)
> - if m:
> - dep_pkg = m.group(1)
> - fd = open(os.path.join(dir, file))
> - lines = fd.readlines()
> - fd.close()
> - ver_file = os.path.join(dir, dep_pkg + '.ver')
> - lib_ver = None
> - if os.path.exists(ver_file):
> - fd = open(ver_file)
> - lib_ver = fd.readline().rstrip()
> - fd.close()
> - for l in lines:
> - shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
> + read_shlib_providers()
>
> bb.utils.unlockfile(lf)
>
> --
> 1.8.2.1
>
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2013-08-28 8:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-06 23:13 [RFC][PATCH 1/4] package.bbclass: move reading shlibs providers to separate function Martin Jansa
2013-07-06 23:13 ` [RFC][PATCH 2/4] package.bbclass: show warning when package is trying to provide already provided shlib Martin Jansa
2013-07-10 11:51 ` Martin Jansa
2013-07-06 23:13 ` [RFC][PATCH 3/4] package.bbclass: add SHLIBSSEARCHDIRS to define where to search for shlib providers Martin Jansa
2013-09-02 11:22 ` Richard Purdie
2013-09-02 11:27 ` Martin Jansa
2013-07-06 23:13 ` [RFC][PATCH 4/4] WIP: package.bbclass: add some pseudo-code to filter shlibs providers based on dependencies Martin Jansa
2013-08-28 8:33 ` Martin Jansa [this message]
2013-09-02 11:19 ` [RFC][PATCH 1/4] package.bbclass: move reading shlibs providers to separate function Richard Purdie
2013-09-05 11:40 ` Richard Purdie
2013-09-05 12:01 ` Martin Jansa
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=20130828083339.GI3544@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.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.