Exemplo n.º 1
0
def format_depchange(change):
    if change:
        is_update = util.compare_evr(change.prev_evr, change.curr_evr) < 0
        return (change.dep_name, format_evr(*change.prev_evr),
                '<>'[is_update], format_evr(*change.curr_evr))

    return [''] * 4
Exemplo n.º 2
0
def format_depchange(change):
    if change:
        is_update = util.compare_evr(change.prev_evr, change.curr_evr) < 0
        return (change.dep_name, format_evr(*change.prev_evr), '<>'[is_update],
                format_evr(*change.curr_evr))

    return [''] * 4
Exemplo n.º 3
0
 def is_build_newer(self, current_build, task_info):
     if current_build is None:
         return True
     return util.compare_evr((current_build.epoch, current_build.version,
                              current_build.release),
                             (task_info['epoch'], task_info['version'],
                              task_info['release'])) < 0
Exemplo n.º 4
0
 def is_build_newer(self, current_build, task_info):
     return (task_info and (not current_build or util.compare_evr(
         (current_build.epoch, current_build.version,
          current_build.release),
         (task_info['epoch'], task_info['version'], task_info['release'])) <
                            0) and self.db.query(Build).filter_by(
                                task_id=task_info['task_id']).count() == 0)
Exemplo n.º 5
0
 def is_build_newer(self, current_build, task_info):
     if current_build is None:
         return True
     return util.compare_evr((current_build.epoch,
                              current_build.version,
                              current_build.release),
                             (task_info['epoch'],
                              task_info['version'],
                              task_info['release'])) < 0
Exemplo n.º 6
0
 def pkg_cmp(pkg1, pkg2):
     return util.compare_evr(
         (pkg1.epoch, pkg1.version, pkg1.release),
         (pkg2.epoch, pkg2.version, pkg2.release),
     )
Exemplo n.º 7
0
 def pkg_cmp(pkg1, pkg2):
     return util.compare_evr(
         (pkg1.epoch, pkg1.version, pkg1.release),
         (pkg2.epoch, pkg2.version, pkg2.release),
     )