gpyutils/packages.py
def find_redundant(pkgs):
    """
    Find redundant packages in the group, i.e. those that have newer
    versions with a superset of keywords and implementations.
    """
    max_keywords = {}
    max_impls = set()
    for p in reversed(pkgs):
        redundant = True

        # live ebuilds are never redundant
        if not p.keywords:
            redundant = False

        # first, determine non-redundancy via keywords
        for k in p.keywords:
            if k.startswith('~'):
                v = 1
                k = k[1:]
            else:  # stable
                v = 2

            if max_keywords.get(k, 0) < v:
                max_keywords[k] = v
                redundant = False

        # then determine non-redundancy via impls
        impls = set(i for i in get_python_impls(p) or ()
                if i.status not in (Status.dead, Status.future))
        if not max_impls.issuperset(impls):
            redundant = False
            max_impls.update(impls)

        if redundant:
            yield p

    Find redundant packages in the group, i.e. those that have newer
    versions with a superset of keywords and implementations.
    
Find redundant packages in the group, i.e. those that have newer
versions with a superset of keywords and implementations.
Find redundant packages in the group i . e . those that have newer versions with a superset of keywords and implementations .
def find_redundant(pkgs):
    max_keywords = {}
    max_impls = set()
    for p in reversed(pkgs):
        redundant = True
        if not p.keywords:
            redundant = False
        for k in p.keywords:
            if k.startswith('~'):
                v = 1
                k = k[1:]
            else:  
                v = 2
            if max_keywords.get(k, 0) < v:
                max_keywords[k] = v
                redundant = False
        impls = set(i for i in get_python_impls(p) or ()
                if i.status not in (Status.dead, Status.future))
        if not max_impls.issuperset(impls):
            redundant = False
            max_impls.update(impls)
        if redundant:
            yield p
def find_redundant ( pkgs ) : max_keywords = { } max_impls = set ( ) for p in reversed ( pkgs ) : redundant = True if not p . keywords : redundant = False for k in p . keywords : if k . startswith ( '~' ) : v = 1 k = k [ 1 : ] else : v = 2 if max_keywords . get ( k , 0 ) < v : max_keywords [ k ] = v redundant = False impls = set ( i for i in get_python_impls ( p ) or ( ) if i . status not in ( Status . dead , Status . future ) ) if not max_impls . issuperset ( impls ) : redundant = False max_impls . update ( impls ) if redundant : yield p
Find redundant packages in the group, i.e.
Find redundant packages in the group i . e .
"""
    Find redundant packages in the group, i.e. those that have newer
    versions with a superset of keywords and implementations.
    """ # live ebuilds are never redundant # first, determine non-redundancy via keywords # stable # then determine non-redundancy via impls
pkgs