Пример #1
0
 def __lt__(self, other):
     rc = cmp(self.name, other.name)
     if type(other) is RPMPackage:
         if rc == 0 and self.version != other.version:
             selfver, selfarch = splitarch(self.version)
             otherver, otherarch = splitarch(other.version)
             if selfver != otherver:
                 rc = vercmp(self.version, other.version)
             if rc == 0:
                 rc = -cmp(archscore(selfarch), archscore(otherarch))
     return rc == -1
Пример #2
0
def collapse_libc_requires(requires):
    """ optionally collapse libc.so.6 requires into highest requires """
    if sysconf.get("rpm-collapse-libc-requires", True):
        best = None
        for req in requires:
            if (req[1].startswith('libc.so.6') and
                not req[1].startswith('libc.so.6()') and
                (not best or vercmp(req[1], best[1]) > 0)):
                best = req
        requires = [x for x in requires
                   if not x[1].startswith('libc.so.6') or x == best]
    return requires
Пример #3
0
def collapse_libc_requires(requires):
    """ optionally collapse libc.so.6 requires into highest requires """
    if sysconf.get("rpm-collapse-libc-requires", True):
        best = None
        for req in requires:
            if (req[1].startswith('libc.so.6') and
                not req[1].startswith('libc.so.6()') and
                (not best or vercmp(req[1], best[1]) > 0)):
                best = req
        requires = [x for x in requires
                   if not x[1].startswith('libc.so.6') or x == best]
    return requires
Пример #4
0
 def __lt__(self, other):
     rc = cmp(self.name, other.name)
     if type(other) is RPMPackage:
         if rc == 0 and self.version != other.version:
             selfver, selfarch = splitarch(self.version)
             otherver, otherarch = splitarch(other.version)
             if selfarch != otherarch:
                 selfcolor = getArchColor(selfarch)
                 othercolor = getArchColor(otherarch)
                 if selfcolor and othercolor:
                     rc = cmp(selfcolor, othercolor)
             if rc == 0:
                 if selfver != otherver:
                     rc = vercmp(selfver, otherver)
                 if rc == 0:
                     rc = -cmp(getArchScore(selfarch), getArchScore(otherarch))
     return rc == -1
Пример #5
0
 def __lt__(self, other):
     rc = cmp(self.name, other.name)
     if type(other) is RPMPackage:
         if rc == 0 and self.version != other.version:
             selfver, selfarch = splitarch(self.version)
             otherver, otherarch = splitarch(other.version)
             if selfarch != otherarch:
                 selfcolor = getArchColor(selfarch)
                 othercolor = getArchColor(otherarch)
                 if selfcolor and othercolor:
                     rc = cmp(selfcolor, othercolor)
             if rc == 0:
                 if selfver != otherver:
                     rc = vercmp(selfver, otherver)
                 if rc == 0:
                     rc = -cmp(getArchScore(selfarch), getArchScore(otherarch))
     return rc == -1