def resolveDependencies(self, uJob, jobSet, split = False,
                            resolveDeps = True, useRepos = True,
                            resolveSource = None, keepRequired = True,
                            criticalUpdateInfo = None):
        searchSource = uJob.getSearchSource()
        if not isinstance(searchSource, searchsource.AbstractSearchSource):
            searchSource = searchsource.SearchSource(searchSource,
                                                     self.cfg.flavor, self.db)
        if useRepos:
            defaultSearchSource = self.client.getSearchSource()
            searchSource = searchsource.stack(searchSource,
                                              defaultSearchSource)
        troveSource = searchSource.getTroveSource()

        ineligible = set()

        check = self.db.getDepStateClass(uJob.getTroveSource(),
           findOrdering = split, ignoreDepClasses = self.cfg.ignoreDependencies)

        (result, cannotResolve, keepList, ineligible) = \
                        self.checkDeps(uJob, jobSet, troveSource,
                                       resolveDeps = resolveDeps,
                                       ineligible=ineligible,
                                       keepRequired = keepRequired,
                                       criticalUpdateInfo = criticalUpdateInfo,
                                       check = check)
        depList = result.unsatisfiedList

        if not resolveDeps:
            # we're not supposed to resolve deps here; just skip the
            # rest of this
            depList = []
            cannotResolve = []

        if resolveSource is None:
            resolveSource = searchSource.getResolveMethod()
            resolveSource.searchLeavesFirst()
        else:
            resolveSource.setTroveSource(troveSource)

        suggMap = {}

        if not hasattr(resolveSource, 'filterDependencies'):
            # add the identity fn for this new api
            resolveSource.filterDependencies = lambda x: x
        depList = resolveSource.filterDependencies(depList)
        while resolveSource.prepareForResolution(depList):

            sugg = resolveSource.resolveDependencies()
            newTroves = resolveSource.filterSuggestions(depList, sugg, suggMap)

            if not newTroves:
                continue

            changedJob = self.addUpdates(newTroves, uJob, jobSet, ineligible,
                                         keepList, troveSource, resolveSource)
            if not changedJob:
                continue

            (result, cannotResolve, newKeepList, ineligible) = \
                                       self.checkDeps(uJob, jobSet,
                                       uJob.getTroveSource(),
                                       resolveDeps = True,
                                       ineligible = ineligible,
                                       keepRequired = keepRequired,
                                       criticalUpdateInfo = criticalUpdateInfo,
                                       check = check)
            depList = result.unsatisfiedList
            keepList.extend(newKeepList)
            depList = resolveSource.filterDependencies(depList)

        check.done()

        changeSetList = result.getChangeSetList()
        criticalUpdates = result.getCriticalUpdates()

        return (depList, suggMap, cannotResolve, changeSetList, keepList,
                criticalUpdates)
Determine and possibly resolve dependency problems.
dataset/ETHPy150Open sassoftware/conary/conary/conaryclient/resolve.py/DependencySolver.resolveDependencies