* [gentoo-commits] portage r11823 - main/trunk/pym/portage/dbapi
@ 2008-11-07 21:18 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-11-07 21:18 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-11-07 21:18:44 +0000 (Fri, 07 Nov 2008)
New Revision: 11823
Modified:
main/trunk/pym/portage/dbapi/vartree.py
Log:
Improve the error message that's generated in LinkageMap.rebuild() for corrupt
NEEDED.ELF.2 entries.
Modified: main/trunk/pym/portage/dbapi/vartree.py
===================================================================
--- main/trunk/pym/portage/dbapi/vartree.py 2008-11-07 21:04:45 UTC (rev 11822)
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-11-07 21:18:44 UTC (rev 11823)
@@ -145,6 +145,7 @@
"""Models dynamic linker dependencies."""
+ _needed_aux_key = "NEEDED.ELF.2"
_soname_map_class = slot_dict_class(
("consumers", "providers"), prefix="")
@@ -262,10 +263,11 @@
if include_file is not None:
lines += grabfile(include_file)
+ aux_keys = [self._needed_aux_key]
for cpv in self._dbapi.cpv_all():
if exclude_pkgs is not None and cpv in exclude_pkgs:
continue
- lines += self._dbapi.aux_get(cpv, ["NEEDED.ELF.2"])[0].split('\n')
+ lines += self._dbapi.aux_get(cpv, aux_keys)[0].split('\n')
# Cache NEEDED.* files avoid doing excessive IO for every rebuild.
self._dbapi.flush_cache()
@@ -292,12 +294,14 @@
proc.wait()
for l in lines:
- if l.strip() == "":
+ l = l.rstrip("\n")
+ if not l:
continue
- fields = l.strip("\n").split(";")
+ fields = l.split(";")
if len(fields) < 5:
- print "Error", fields
- # insufficient field length
+ writemsg_level("\nWrong number of fields " + \
+ "in %s: %s\n\n" % (self._needed_aux_key, l),
+ level=logging.ERROR, noiselevel=-1)
continue
arch = fields[0]
obj = fields[1]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-07 21:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-07 21:18 [gentoo-commits] portage r11823 - main/trunk/pym/portage/dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox