def displayTroves(cfg, troveSpecs=[], pathList = [], whatProvidesList=[],
                  # query options
                  versionFilter=VERSION_FILTER_LATEST,
                  flavorFilter=FLAVOR_FILTER_BEST,
                  useAffinity = False,
                  # trove options
                  info = False, digSigs = False, showDeps = False,
                  showBuildReqs = False, showBuildLog = False, filesToShow = [],
                  # file options
                  ls = False, lsl = False, ids = False, sha1s = False,
                  tags = False, fileDeps = False, fileVersions = False,
                  fileFlavors = False, capsules = False,
                  # collection options
                  showTroves = False, recurse = None, showAllTroves = False,
                  weakRefs = False, showTroveFlags = False,
                  alwaysDisplayHeaders = False,
                  troveTypes=trovesource.TROVE_QUERY_PRESENT):

    if showBuildLog and len(troveSpecs)>1:
        raise ConaryError('Error: can not show build log for several packages. Please specify one')
    if filesToShow and len(troveSpecs)>1:
        raise ConaryError('Error: can not show files log for several packages. Please specify one')

    client = conaryclient.ConaryClient(cfg)
    repos = client.getRepos()

    if useAffinity:
        affinityDb = client.db
    else:
        affinityDb = None

    whatProvidesList = [ deps.parseDep(x) for x in whatProvidesList ]

    troveTups = getTrovesToDisplay(repos, troveSpecs, pathList,
                                   whatProvidesList,
                                   versionFilter, flavorFilter,
                                   cfg.installLabelPath, cfg.flavor,
                                   affinityDb,
                                   troveTypes=troveTypes)

    if (filesToShow or showBuildLog) and len(troveTups)>1:
        raise ConaryError('Error: %s is ambigious. Please specify one of: \n%s' % \
                    (troveSpecs[0],
                    "\n".join([x[0]+"="+str(x[1].trailingLabel()) for x in troveTups]) ))

    dcfg = display.DisplayConfig(repos, affinityDb)

    dcfg.setTroveDisplay(deps=showDeps, info=info,
                         showBuildReqs=showBuildReqs, showBuildLog=showBuildLog, filesToShow = filesToShow,
                         digSigs=digSigs, fullVersions=cfg.fullVersions,
                         showLabels=cfg.showLabels, fullFlavors=cfg.fullFlavors,
                         showComponents = cfg.showComponents,
                         baseFlavors = cfg.flavor)

    dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags,
                        fileDeps=fileDeps, fileVersions=fileVersions,
                        fileFlavors=fileFlavors, capsules=capsules)

    recurseOne = showTroves or showAllTroves or weakRefs
    if recurse is None and not recurseOne and troveSpecs:
        # if we didn't explicitly set recurse and we're not recursing one
        # level explicitly and we specified troves (so everything won't
        # show up at the top level anyway), guess at whether to recurse
        recurse = True in (ls, lsl, ids, sha1s, tags, showDeps, fileDeps,
                           fileVersions, fileFlavors)
    displayHeaders = alwaysDisplayHeaders or showTroveFlags

    dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne,
                         showNotByDefault = showAllTroves or showBuildLog,
                         showWeakRefs = weakRefs,
                         showTroveFlags = showTroveFlags,
                         displayHeaders = displayHeaders,
                         checkExists = False)

    if troveSpecs:
        dcfg.setPrimaryTroves(set(troveTups))


    formatter = display.TroveFormatter(dcfg)

    display.displayTroves(dcfg, formatter, troveTups)
Displays information about troves found in repositories
dataset/ETHPy150Open sassoftware/conary/conary/cmds/queryrep.py/displayTroves