def parse_sources(sources_filename):
    """Parse a 'sources' file to get a list of files that need to be downloaded
    for a package.

    Args:
        param1 (str) sources_filename: the full path to a valid sources file

    Returns:
        list of (str:md5sum, str:url, str:override_filename) 
                or 
                (str:md5sum, str:url, bool:has_override)
    
    """
    fbuff = ""
    with open(sources_filename, "r") as fd:
        fbuff = fd.readlines()
    sources = []
    for line in fbuff:
        split_line = line.rstrip().split(" ")
        line_length = len(split_line)
        if line_length == 2 or line_length == 3:
            pass
        else:
            print("{} appears to have a mangled line...".format(sources_filename))
            exit()
        md5 = split_line[0]
        url = split_line[1]
        if len(split_line) == 3:
            filename = split_line[2]
        else:
            filename = None
        sources.append([md5, url, filename])
    return sources