portage.util._dyn_libs.NeededEntry module

class portage.util._dyn_libs.NeededEntry.NeededEntry

Bases: object

Represents one entry (line) from a NEEDED.ELF.2 file. The entry must have 5 or more semicolon-delimited fields in order to be considered valid. The sixth field is optional, corresponding to the multilib category. The multilib_category attribute is None if the corresponding field is either empty or missing.

_MIN_FIELDS = 5
_MULTILIB_CAT_INDEX = 5
arch
filename
multilib_category
needed
classmethod parse(filename, line)

Parse a NEEDED.ELF.2 entry. Raises InvalidData if necessary.

Parameters
  • filename (str) – file name for use in exception messages

  • line (str) – a single line of text from a NEEDED.ELF.2 file, without a trailing newline

Return type

NeededEntry

Returns

A new NeededEntry instance containing data from line

runpaths
soname