Пример #1
0
 def get_dependencies(self, po):
     reqs = YumClient.get_dependencies(self, po)
     rc = {}
     for req_tup, po in reqs:
         req = prco_tuple_to_string(req_tup)
         cpo = self.package_cache._add(po)
         if req in rc:
             rc[req].append(cpo)
         else:
             rc[req] = [cpo]
     return rc
Пример #2
0
 def processResults(results):
     reqlist = {}
     notfound = {}
     for pkg in results:
         if len(results[pkg]) == 0:
             continue
         for req in results[pkg]:
             rlist = results[pkg][req]
             if not rlist:
                 # Unsatisfied dependency
                 notfound[prco_tuple_to_string(req)] = []
                 continue
             reqlist[prco_tuple_to_string(req)] = rlist
     found = {}
     for req, rlist in reqlist.items():
         found[req] = []
         for r in rlist:
             dep = [r.name, r.version, r.epoch, r.release, r.arch]
             if dep not in found[req]:
                 found[req].append(dep)
     return found, notfound
Пример #3
0
 def processResults(results):
     reqlist = {}
     notfound = {}
     for pkg in results:
         if len(results[pkg]) == 0:
             continue
         for req in results[pkg]:
             rlist = results[pkg][req]
             if not rlist:
                 # Unsatisfied dependency
                 notfound[prco_tuple_to_string(req)] = []
                 continue
             reqlist[prco_tuple_to_string(req)] = rlist
     found = {}
     for req, rlist in reqlist.items():
         found[req] = []
         for r in rlist:
             dep = [r.name, r.version, r.epoch, r.release, r.arch]
             if dep not in found[req]:
                 found[req].append(dep)
     return found, notfound
Пример #4
0
    def printable_result(results):
        print_doc_str = ""
        for pkg in results:
            if len(results[pkg]) == 0:
                continue
            for req in results[pkg]:
                rlist = results[pkg][req]
                print_doc_str += "\n dependency: %s \n" % prco_tuple_to_string(req)
                if not rlist:
                    # Unsatisfied dependency
                    print_doc_str += "   Unsatisfied dependency \n"
                    continue

                for po in rlist:
                    print_doc_str += "   provider: %s\n" % po.compactPrint()
        return print_doc_str
Пример #5
0
    def printable_result(results):
        print_doc_str = ""
        for pkg in results:
            if not results[pkg]:
                continue
            for req in results[pkg]:
                rlist = results[pkg][req]
                print_doc_str += "\n dependency: %s \n" % prco_tuple_to_string(req)
                if not rlist:
                    # Unsatisfied dependency
                    print_doc_str += "   Unsatisfied dependency \n"
                    continue

                for po in rlist:
                    print_doc_str += "   provider: %s\n" % po.compactPrint()
        return print_doc_str