예제 #1
0
def conf():
    if cfg_files:
        log.info("Following config files were read:")
        helpers.print_list(cfg_files)
    else:
        log.info("No rdopkg config files found, using default config:")
    log.info("")
    for item in cfg.items():
        log.info("%s: %s" % item)
예제 #2
0
def conf():
    if cfg_files:
        log.info("Following config files were read:")
        helpers.print_list(cfg_files)
    else:
        log.info("No rdopkg config files found, using default config:")
    log.info("")
    for item in cfg.items():
        log.info("%s: %s" % item)
예제 #3
0
def print_reqcheck(met, any_version, wrong_version, missing):
    cats = [
        ("\n{t.bold_green}MET{t.normal}:", met),
        ("\n{t.bold}VERSION NOT ENFORCED{t.normal}:", any_version),
        ("\n{t.bold_yellow}VERSION MISMATCH{t.normal}:", wrong_version),
        ("\n{t.bold_red}MISSING{t.normal}:", missing),
        ]
    for title, reqs in cats:
        if not reqs:
            continue
        print(title.format(t=log.term))
        helpers.print_list(reqs, pre='  ')
예제 #4
0
파일: pushupdate.py 프로젝트: djipko/rdopkg
 def print_summary(self):
     n_good = len(self.update_files)
     n_bad = len(self.fails)
     n_all = n_good + n_bad
     if self.update_files:
         log.success("\n%d update(s) SUCCEEDED:" % n_good)
         fmt = '{t.bold}{upf}{t.normal}'
         l = map(lambda x: fmt.format(t=log.term, upf=x), self.update_files)
         helpers.print_list(l)
     if self.fails:
         log.error("\n%s update(s) FAILED:" % n_bad)
         fmt = ("{t.warn}{upf}{t.normal} failed during "
                "{t.bold}{stage}{t.normal}: {err}")
         l = map(lambda x: fmt.format(t=log.term, upf=x[0], err=x[1],
                                      stage=x[2]), self.fails)
         helpers.print_list(l)
     print
예제 #5
0
 def print_summary(self):
     n_good = len(self.update_files)
     n_bad = len(self.fails)
     n_all = n_good + n_bad
     if self.update_files:
         log.success("\n%d update(s) SUCCEEDED:" % n_good)
         fmt = '{t.bold}{upf}{t.normal}'
         l = map(lambda x: fmt.format(t=log.term, upf=x), self.update_files)
         helpers.print_list(l)
     if self.fails:
         log.error("\n%s update(s) FAILED:" % n_bad)
         fmt = ("{t.warn}{upf}{t.normal} failed during "
                "{t.bold}{stage}{t.normal}: {err}")
         l = map(
             lambda x: fmt.format(
                 t=log.term, upf=x[0], err=x[1], stage=x[2]), self.fails)
         helpers.print_list(l)
     print
예제 #6
0
def print_reqcheck(met, any_version, wrong_version, missing, format=None):
    cats = [
        ("{t.bold_green}MET{t.normal}:", met),
        ("{t.bold}VERSION NOT ENFORCED{t.normal}:", any_version),
        ("{t.bold_yellow}VERSION MISMATCH{t.normal}:", wrong_version),
        ("{t.bold_red}MISSING{t.normal}:", missing),
    ]
    if format == 'spec':
        # get alignment from .spec file
        spec = specfile.Spec()
        pre = 'Requires:' + (spec.get_tag_align_ws('Requires') or '        ')
    else:
        pre = '  '
    first = True
    for title, reqs in cats:
        if not reqs:
            continue
        if first:
            first = False
        else:
            print("")
        print(title.format(t=log.term))
        reqs = [x.__str__(format=format) for x in reqs]
        helpers.print_list(reqs, pre=pre)
예제 #7
0
def print_reqcheck(met, any_version, wrong_version, missing, format=None):
    cats = [
        ("{t.bold_green}MET{t.normal}:", met),
        ("{t.bold}VERSION NOT ENFORCED{t.normal}:", any_version),
        ("{t.bold_yellow}VERSION MISMATCH{t.normal}:", wrong_version),
        ("{t.bold_red}MISSING{t.normal}:", missing),
    ]
    if format == 'spec':
        # get alignment from .spec file
        spec = specfile.Spec()
        pre = 'Requires:' + (spec.get_tag_align_ws('Requires') or '        ')
    else:
        pre = '  '
    first = True
    for title, reqs in cats:
        if not reqs:
            continue
        if first:
            first = False
        else:
            print("")
        print(title.format(t=log.term))
        reqs = [x.__str__(format=format) for x in reqs]
        helpers.print_list(reqs, pre=pre)
예제 #8
0
def print_reqdiff(added, changed, removed):
    if added:
        print("\n{t.bold}ADDED{t.normal}:".format(t=log.term))
        helpers.print_list(added, pre='  ')
    if changed:
        print("\n{t.bold}CHANGED{t.normal}:".format(t=log.term))
        helpers.print_list(changed, pre='  ')
    if removed:
        print("\n{t.bold}REMOVED{t.normal}:".format(t=log.term))
        helpers.print_list(removed, pre='  ')
    if not (added or changed or removed):
        print("\nno requirements changed")
    print("")
예제 #9
0
파일: reqs.py 프로젝트: yac/rdopkg
def print_reqdiff(added, changed, removed):
    if added:
        print("\n{t.bold}ADDED{t.normal}:".format(t=log.term))
        helpers.print_list(added, pre='  ')
    if changed:
        print("\n{t.bold}CHANGED{t.normal}:".format(t=log.term))
        helpers.print_list(changed, pre='  ')
    if removed:
        print("\n{t.bold}REMOVED{t.normal}:".format(t=log.term))
        helpers.print_list(removed, pre='  ')
    if not (added or changed or removed):
        print("\nno requirements changed")
    print("")