From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/util/_dyn_libs/
Date: Sat, 23 Jul 2011 06:23:51 +0000 (UTC) [thread overview]
Message-ID: <f0ef754b7dafe892ce58725b32e2146904414b7e.zmedico@gentoo> (raw)
commit: f0ef754b7dafe892ce58725b32e2146904414b7e
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 23 06:22:52 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 06:22:52 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f0ef754b
LinkageMapELF: remove 5-tuple unpack code
---
pym/portage/util/_dyn_libs/LinkageMapELF.py | 39 +++++++++++++++-----------
1 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/pym/portage/util/_dyn_libs/LinkageMapELF.py b/pym/portage/util/_dyn_libs/LinkageMapELF.py
index c3c0706..b616292 100644
--- a/pym/portage/util/_dyn_libs/LinkageMapELF.py
+++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py
@@ -39,14 +39,6 @@ class LinkageMapELF(object):
self.alt_paths = alt_paths
self.owner = owner
- def __iter__(self):
- """Backward compatibility with 5-tuples."""
- yield self.arch
- yield self.needed
- yield self.runpaths
- yield self.soname
- yield self.alt_paths
-
def __init__(self, vardbapi):
self._dbapi = vardbapi
self._root = self._dbapi.settings['ROOT']
@@ -405,8 +397,13 @@ class LinkageMapELF(object):
if obj_key.file_exists():
# Get the arch and soname from LinkageMap._obj_properties if
# it exists. Otherwise, None.
- arch, _needed, _path, soname, _objs = \
- self._obj_properties.get(obj_key, (None,)*5)
+ obj_props = self._obj_properties.get(obj_key)
+ if obj_props is None:
+ arch = None
+ soname = None
+ else:
+ arch = obj_props.arch
+ soname = obj_props.soname
return cache_self.cache.setdefault(obj, \
(arch, soname, obj_key, True))
else:
@@ -419,7 +416,10 @@ class LinkageMapELF(object):
# Iterate over all obj_keys and their providers.
for obj_key, sonames in providers.items():
- arch, _needed, path, _soname, objs = self._obj_properties[obj_key]
+ obj_props = self._obj_properties[obj_key]
+ arch = obj_props.arch
+ path = obj_props.runpaths
+ objs = obj_props.alt_paths
path = path.union(self._defpath)
# Iterate over each needed soname and the set of library paths that
# fulfill the soname to determine if the dependency is broken.
@@ -647,7 +647,10 @@ class LinkageMapELF(object):
if obj_key not in self._obj_properties:
raise KeyError("%s (%s) not in object list" % (obj_key, obj))
- arch, needed, path, _soname, _objs = self._obj_properties[obj_key]
+ obj_props = self._obj_properties[obj_key]
+ arch = obj_props.arch
+ needed = obj_props.needed
+ path = obj_props.runpaths
path_keys = set(self._path_key(x) for x in path.union(self._defpath))
for soname in needed:
rValue[soname] = set()
@@ -741,7 +744,9 @@ class LinkageMapELF(object):
(soname_st.st_dev, soname_st.st_ino):
return set()
- arch, _needed, _path, soname, _objs = self._obj_properties[obj_key]
+ obj_props = self._obj_properties[obj_key]
+ arch = obj_props.arch
+ soname = obj_props.soname
soname_node = None
arch_map = self._libs.get(arch)
@@ -771,8 +776,7 @@ class LinkageMapELF(object):
if relevant_dir_keys:
for consumer_key in soname_node.consumers:
- _arch, _needed, path, _soname, _consumer_objs = \
- self._obj_properties[consumer_key]
+ path = self._obj_properties[consumer_key].runpaths
path_keys = defpath_keys.copy()
path_keys.update(self._path_key(x) for x in path)
if relevant_dir_keys.intersection(path_keys):
@@ -787,8 +791,9 @@ class LinkageMapELF(object):
for consumer_key in soname_node.consumers:
if consumer_key in satisfied_consumer_keys:
continue
- _arch, _needed, path, _soname, consumer_objs = \
- self._obj_properties[consumer_key]
+ consumer_props = self._obj_properties[consumer_key]
+ path = consumer_props.runpaths
+ consumer_objs = consumer_props.alt_paths
path_keys = defpath_keys.union(self._path_key(x) for x in path)
if objs_dir_keys.intersection(path_keys):
rValue.update(consumer_objs)
next reply other threads:[~2011-07-23 6:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-23 6:23 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-25 16:12 [gentoo-commits] proj/portage:master commit in: pym/portage/util/_dyn_libs/ Zac Medico
2018-01-02 23:04 Zac Medico
2016-12-27 21:43 Zac Medico
2016-06-06 16:03 Zac Medico
2015-06-02 3:48 Zac Medico
2015-04-24 17:53 Zac Medico
2013-03-18 23:43 Zac Medico
2013-03-18 23:35 Zac Medico
2013-02-22 18:52 Arfrever Frehtes Taifersar Arahesis
2012-03-22 15:24 Zac Medico
2012-03-21 21:24 Zac Medico
2012-03-05 7:32 Zac Medico
2012-02-18 3:11 Zac Medico
2012-02-18 2:06 Zac Medico
2012-02-01 2:04 Zac Medico
2011-07-24 2:58 Zac Medico
2011-07-24 2:58 Zac Medico
2011-07-24 2:15 Zac Medico
2011-07-22 20:38 Zac Medico
2011-07-22 8:03 Zac Medico
2011-07-20 8:05 Zac Medico
2011-07-20 4:51 Zac Medico
2011-07-01 4:02 Zac Medico
2011-07-01 4:02 Zac Medico
2011-07-01 1:37 Zac Medico
2011-06-30 10:17 Zac Medico
2011-06-30 10:01 Zac Medico
2011-05-08 21:31 Zac Medico
2011-05-08 7:10 Zac Medico
2011-05-08 5:02 Zac Medico
2011-05-07 17:25 Zac Medico
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=f0ef754b7dafe892ce58725b32e2146904414b7e.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox