def select(package_specifier): """Select a package. Only selected packages are considered when building up the environment for 'po enter'. """ to_select = repository.find_installed_packages(package_specifier) if not to_select: return util.error("No matching packages.") project_specifier = package.Specifier(package_specifier.project, {}) to_deselect = repository.find_installed_packages(project_specifier) map(deselect_package, to_deselect) map(select_package, to_select)
def deselect(package_specifier): "Deselect a package." map(deselect_package, repository.find_installed_packages(package_specifier))