def METHOD_NAME(name, member, path, digest="", conn=None):
    """
    Register a file in the package database
    """
    close = False
    if conn is None:
        close = True
        conn = init()
    conn.execute(
        "INSERT INTO files VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
        (
            name,
            "{}/{}".format(path, member.path),
            member.size,
            member.mode,
            digest,
            member.devmajor,
            member.devminor,
            member.linkname,
            member.linkpath,
            member.uname,
            member.gname,
            member.mtime,
        ),
    )
    if close:
        conn.close()