Package conary :: Module display
[hide private]
[frames] | no frames]

Module display

source code

Provides output methods for displaying troves

Classes [hide private]
  DisplayConfig
Configuration for a display command.
  TroveTupFormatter
Formats (n,v,f) troveTuples taking into account the other tuples that have and will be formatted
  TroveFormatter
Formats trove objects (displaying more than just NVF)
  JobDisplayConfig
  JobTupFormatter
  JobFormatter
Functions [hide private]
 
jobKey(x) source code
 
displayTroves(dcfg, formatter, troveTups)
display the given list of source troves
source code
 
filterComponents(tupList, primaryTroves=[]) source code
 
_sortTroves(a, b) source code
yields (troveTup, troveObj, flags, indent) tuples
iterTroveList(troveSource, troveTups, recurseAll=False, recurseOne=False, recursePackages=False, needTroves=False, getPristine=True, showNotByDefault=False, showWeakRefs=False, checkExists=False, showNotExists=False, showFlags=False, primaryTroves=[])
Given a troveTup list, iterate over those troves and their child troves as specified by parameters
source code
 
displayJobLists(dcfg, formatter, jobLists, prepare=True) source code
 
displayJobs(dcfg, formatter, jobs, prepare=True, jobNum=0, total=0)
display the given list of jobs
source code
Variables [hide private]
  TROVE_BYDEFAULT = 1
  TROVE_STRONGREF = 2
  TROVE_HASTROVE = 4
Function Details [hide private]

displayTroves(dcfg, formatter, troveTups)

source code 
display the given list of source troves
Parameters:
  • dcfg (display.DisplayConfig) - stores information about the type of display to perform
  • formatter (display.TroveFormatter) - contains methods to display the troves
  • troveTups (ordered list of (n,v,f) tuples) - the trove tuples to display

iterTroveList(troveSource, troveTups, recurseAll=False, recurseOne=False, recursePackages=False, needTroves=False, getPristine=True, showNotByDefault=False, showWeakRefs=False, checkExists=False, showNotExists=False, showFlags=False, primaryTroves=[])

source code 
Given a troveTup list, iterate over those troves and their child troves as specified by parameters
Parameters:
  • troveSource (display.DisplayConfig) - place to retrieve the trove instances matching troveTups
  • recurseAll (bool) - if true, recursively descend through the listed troves
  • recurseOne - if True, include just the first level of troves below the listed troves (but do not recurse)
  • needTroves (bool) - if True, return trove objects. Otherwise, return None as each trove object
  • getPristine (bool) - if True, get pristine trove objects
  • showNotByDefault (bool) - if True, yield not bydefault troves
  • showWeakRefs (bool) - if True, yield troves that are weak references
  • checkExists (bool) - if True, add flag MISSING for troves that do not exist (but are referenced) in this troveSource
  • showNotExists (bool) - if True, show troves that do not exist (but are referenced) in this troveSource
Returns: yields (troveTup, troveObj, flags, indent) tuples

displayJobs(dcfg, formatter, jobs, prepare=True, jobNum=0, total=0)

source code 
display the given list of jobs
Parameters:
  • dcfg (display.DisplayConfig) - stores information about the type of display to perform
  • formatter (display.TroveFormatter) - contains methods to display the troves
  • jobs (ordered list of (n,v,f) job) - the job tuples to display