From: Zac Medico Date: Thu, 21 Oct 2010 11:49:42 +0000 (-0700) Subject: Show paths of corrupt NEEDED.ELF.2 files. X-Git-Tag: v2.2_rc99~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41d54403437745bc4ed4c66a54b2b741576debb7;p=portage.git Show paths of corrupt NEEDED.ELF.2 files. --- diff --git a/pym/portage/util/_dyn_libs/LinkageMapELF.py b/pym/portage/util/_dyn_libs/LinkageMapELF.py index 6c8f3b441..bbfce8880 100644 --- a/pym/portage/util/_dyn_libs/LinkageMapELF.py +++ b/pym/portage/util/_dyn_libs/LinkageMapELF.py @@ -161,13 +161,17 @@ class LinkageMapELF(object): # Data from include_file is processed first so that it # overrides any data from previously installed files. if include_file is not None: - lines += grabfile(include_file) + for line in grabfile(include_file): + lines.append((include_file, line)) 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, aux_keys)[0].split('\n') + needed_file = self._dbapi.getpath(cpv, + filename=self._needed_aux_key) + for line in self._dbapi.aux_get(cpv, aux_keys)[0].splitlines(): + lines.append((needed_file, line)) # Cache NEEDED.* files avoid doing excessive IO for every rebuild. self._dbapi.flush_cache() @@ -208,7 +212,7 @@ class LinkageMapELF(object): continue fields[1] = fields[1][root_len:] plibs.discard(fields[1]) - lines.append(";".join(fields)) + lines.append(("scanelf", ";".join(fields))) proc.wait() if plibs: @@ -219,16 +223,16 @@ class LinkageMapELF(object): # is important in order to prevent findConsumers from raising # an unwanted KeyError. for x in plibs: - lines.append(";".join(['', x, '', '', ''])) + lines.append(("plibs", ";".join(['', x, '', '', '']))) - for l in lines: + for location, l in lines: l = l.rstrip("\n") if not l: continue fields = l.split(";") if len(fields) < 5: writemsg_level(_("\nWrong number of fields " \ - "in %s: %s\n\n") % (self._needed_aux_key, l), + "in %s: %s\n\n") % (location, l), level=logging.ERROR, noiselevel=-1) continue arch = fields[0]