tuple: refactor to use pkg_list_t framework