def get_kit_url(self, name, version, iteration): \ # pylint: disable=no-self-use kit = Kit(name, version, iteration) native_repo = repoManager.getRepo() return os.path.join(native_repo.getRemoteUrl(), kit.getTarBz2FileName())
def _install_os_packages(self, kit, os_info_list): """ Installs OS specific packages from the kit into the repo. :param kit: the kit instance :param os_info_list: a list of osInfo instances to install for """ all_component_list = kit.getComponentList() for os_info in os_info_list: self._logger.debug( 'Preparing to install ({}, {}, {}) for {}'.format( kit.getName(), kit.getVersion(), kit.getIteration(), os_info ) ) # # Get list of compatible components # os_object_factory = getOsObjectFactory( mapOsName(os_info.getName()) ) component_manager = os_object_factory.getComponentManager() component_list = component_manager.getCompatibleComponentList( os_info, all_component_list) if not component_list: continue # # Create the package directory in the repo # repo = repoManager.getRepo(os_info) full_dir = os.path.join(repo.getLocalPath(), kit.getKitRepoDir()) osUtility.createDir(full_dir) # # Install the packages into the repo package directory # for component in component_list: self._logger.debug( '[{0}] Found component [{1}]'.format( self.__class__.__name__, component)) for package in component.getPackageList(): package_file = os.path.join( kit.install_path, package.getRelativePath()) self._logger.debug( '[{0}] Found package [{1}]'.format( self.__class__.__name__, package_file)) repo.addPackage(package_file, kit.getKitRepoDir()) repo.create(kit.getKitRepoDir())