def METHOD_NAME(self, filelist, pn, localdirsexclude):
    """Get checksums for a list of files"""
    def checksum_file(f):
        try:
            checksum = self.get_checksum(f)
        except OSError as e:
            bb.warn("Unable to get checksum for %s SRC_URI entry %s: %s" % (pn, os.path.basename(f), e))
            return None
        return checksum
    def checksum_dir(pth):
        # Handle directories recursively
        if pth == "/":
            bb.fatal("Refusing to checksum /")
        dirchecksums = []
        for root, dirs, files in os.walk(pth, topdown=True):
            [dirs.remove(d) for d in list(dirs) if d in localdirsexclude]
            for name in files:
                fullpth = os.path.join(root, name)
                checksum = checksum_file(fullpth)
                if checksum:
                    dirchecksums.append((fullpth, checksum))
        return dirchecksums
    checksums = []
    for pth in filelist.split():
        exist = pth.split(":")[1]
        if exist == "False":
            continue
        pth = pth.split(":")[0]
        if '*' in pth:
            # Handle globs
            for f in glob.glob(pth):
                if os.path.isdir(f):
                    if not os.path.islink(f):
                        checksums.extend(checksum_dir(f))
                else:
                    checksum = checksum_file(f)
                    if checksum:
                        checksums.append((f, checksum))
        elif os.path.isdir(pth):
            if not os.path.islink(pth):
                checksums.extend(checksum_dir(pth))
        else:
            checksum = checksum_file(pth)
            if checksum:
                checksums.append((pth, checksum))
    checksums.sort(key=operator.itemgetter(1))
    return checksums