def create_installed_package(package_name, config=None): stamp_root = util.get_install_stamp_root(config) info_file = os.path.join(stamp_root, package_name + '.info') if not os.path.exists(info_file): raise error.Error('package not installed: %s [%s]' % (package_name, config)) return InstalledPackage(info_file)
def installed_package_iterator(config): stamp_root = util.get_install_stamp_root(config) if not os.path.exists(stamp_root): return for filename in os.listdir(stamp_root): if os.path.splitext(filename)[1] != '.info': continue info_file = os.path.join(stamp_root, filename) if os.path.exists(info_file): yield InstalledPackage(info_file)
def clean_all(config): """Remove all build directories and all pre-built packages as well as all installed packages for the given configuration.""" def rmtree(path): util.log('removing %s' % path) util.remove_tree(path) rmtree(paths.STAMP_DIR) rmtree(paths.BUILD_ROOT) rmtree(paths.PUBLISH_ROOT) rmtree(paths.PACKAGES_ROOT) rmtree(util.get_install_stamp_root(config)) rmtree(util.get_install_root(config))