@staticmethod
def parse_check_update(check_update_output):
    updates = {}
    obsoletes = {}
    out = re.sub('\\n[^\\w]\\W+(.*)', ' \\1', check_update_output)
    available_updates = out.split('\n')
    for line in available_updates:
        line = line.split()
        if (('*' in line) or (len(line) not in [3, 6]) or ('.' not in line[0])):
            continue
        else:
            (pkg, version, repo) = (line[0], line[1], line[2])
            (name, dist) = pkg.rsplit('.', 1)
            updates.update({name: {'version': version, 'dist': dist, 'repo': repo}})
            if (len(line) == 6):
                (obsolete_pkg, obsolete_version, obsolete_repo) = (line[3], line[4], line[5])
                (obsolete_name, obsolete_dist) = obsolete_pkg.rsplit('.', 1)
                obsoletes.update({obsolete_name: {'version': obsolete_version, 'dist': obsolete_dist, 'repo': obsolete_repo}})
    return (updates, obsoletes)
@staticmethod
def parse_check_update(check_update_output):
    updates = {}
    obsoletes = {}
    out = re.sub('\\n[^\\w]\\W+(.*)', ' \\1', check_update_output)
    available_updates = out.split('\n')
    for line in available_updates:
        line = line.split()
        if (('*' in line) or (len(line) not in [3, 6]) or ('.' not in line[0])):
            continue
        else:
            (pkg, version, repo) = (line[0], line[1], line[2])
            (name, dist) = pkg.rsplit('.', 1)
            updates.update({name: {'version': version, 'dist': dist, 'repo': repo}})
            if (len(line) == 6):
                (obsolete_pkg, obsolete_version, obsolete_repo) = (line[3], line[4], line[5])
                (obsolete_name, obsolete_dist) = obsolete_pkg.rsplit('.', 1)
                obsoletes.update({obsolete_name: {'version': obsolete_version, 'dist': obsolete_dist, 'repo': obsolete_repo}})
    return (updates, obsoletes)