def find_ultimate_dependency(cache, deps):
	"""Find any one manually-installed package that ultimately caused at
	least one of the given deps to be installed. Returns "" if none found.
	"""
	depchain = {dep: dep for dep in deps}
	while depchain:
		newchain = {}
		for dep, path in depchain.items():
			for parent in cache[dep]._pkg.rev_depends_list:
				if parent.dep_type_untranslated != "Depends": continue
				n = parent.parent_pkg.name
				if not cache[n].installed: continue
				if not cache[n].is_auto_installed:
					# Found one!
					return path + " --> " + n
				newchain[n] = path + " - " + n
		depchain = newchain
	return ""