Add default repos (if present) to the list of additional repositories specified in appliance definition.
170478
def add_repos(repos)
      return if repos.empty?

      repos[@appliance_config.os.version].each do |name, repo|
        r = { 'name' => name, 'ephemeral' => true }

        ['baseurl', 'mirrorlist'].each { |type| r[type] = substitute_vars(repo[type]) unless repo[type].nil? }

        @appliance_config.repos << r
      end
    end
663038
def add_repositories():
    
    if not env.overwrite and env.LINUX_PACKAGE_REPOSITORIES == server_state('linux_package_repositories'): return
    if env.verbosity:
        print env.host, "UNCOMMENTING SOURCES in /etc/apt/sources.list and adding PPAs"
    if contains(filename='/etc/apt/sources.list',text='#(.?)deb(.*)http:(.*)universe'):

        _backup_file('/etc/apt/sources.list')
        uncomment('/etc/apt/sources.list','#(.?)deb(.*)http:(.*)universe',use_sudo=True)
    install_package('python-software-properties')
    for p in env.LINUX_PACKAGE_REPOSITORIES:
        sudo('add-apt-repository %s'% p)
        if env.verbosity:
            print 'added source', p
    set_server_state('linux_package_repositories',env.LINUX_PACKAGE_REPOSITORIES)
1111082
def repo_in_defined_envs(repo, all_envs):
    """"""
    remaining_envs = set(repo['env']) - set(all_envs)
    if set(repo['env']) - set(all_envs):
        raise JuicerRepoInUndefinedEnvs("Repo def %s references undefined environments: %s" %
                                        (repo['name'], ", ".join(list(remaining_envs))))
    else:
        return True
894909
public function setDefault(): void
	{
		$repo = $this->getRepository();
		$locales = $repo->findAll();
		foreach ($locales as $locale) {
			/* @var $locale self */
			$locale->default = false;
			$repo->persist($locale);
		}
		$this->default = true;
		$repo->persist($this);
		$repo->flush();
	}
292588
def add_repo(self, repo_name, items):
        
        juicer.utils.Log.log_debug("[CART:%s] Adding %s items to repo '%s'" % \
                                       (self.cart_name, len(items), repo_name))
        # We can't just straight-away add all of `items` to the
        # repo. `items` may be composed of a mix of local files, local
        # directories, remote files, and remote directories. We need
        # to filter and validate each item.
        items = juicer.utils.filter_package_list(items)
        cart_items = []
        for item in items:
            juicer.utils.Log.log_debug("Creating CartObject for %s" % item)
            i = juicer.common.CartItem.CartItem(item)
            cart_items.append(i)
        self.repo_items_hash[repo_name] = cart_items
1302263
public function addRepositories($repositories)
    {
        if (!is_array($repositories) && (!is_object($repositories) || !$repositories instanceof \Traversable)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid argument provided for $repositories, expecting either an array or Traversable object, but' .
                ' "%s" given',
                is_object($repositories) ? get_class($repositories) : gettype($repositories)
            ));
        }
        foreach ($repositories as $repo) {
            $this->addRepository($repo);
        }
    }
382121
private void addRepository(String repositoryId, RepositoryWrapper repositoryHolder) {
        repositories.put(repositoryId, repositoryHolder);
        try {
            numRepos = getNumberOfRepositories();
        } catch (WIMException e) {
            // okay
        }
    }
1334946
public Repository addRepository(String name,
                                    String url) {
        Repository repository = new Repository(name, url);
        repositories.add(repository);
        return repository;
    }
913757
def get_repo_config(self, repo='default'):
        
        for repo_config in self.repositories:
            if repo_config.name == repo or repo_config.url in RepositoryURL(repo):
                return repo_config

        return None
357429
def default_repository(self):
        
        default_dict_repo = {}
        for line in self.default_repositories_list.splitlines():
            line = line.lstrip()
            if not line.startswith("#"):
                if line.split()[0] in self.DEFAULT_REPOS_NAMES:
                    default_dict_repo[line.split()[0]] = line.split()[1]
                else:
                    print("\nslpkg: Error: Repository name '{0}' is not "
                          "default.\n              Please check file: "
                          "/etc/slpkg/default-repositories\n".format(
                              line.split()[0]))
                    raise SystemExit()
        return default_dict_repo
1304098
def _add_defaults_python(self):
        """"""
        if self.distribution.has_pure_modules():
            build_py = self.get_finalized_command('build_py')
            self.filelist.extend(build_py.get_source_files())
            # This functionality is incompatible with include_package_data, and
            # will in fact create an infinite recursion if include_package_data
            # is True.  Use of include_package_data will imply that
            # distutils-style automatic handling of package_data is disabled
            if not self.distribution.include_package_data:
                for _, src_dir, _, filenames in build_py.data_files:
                    self.filelist.extend([os.path.join(src_dir, filename)
                                          for filename in filenames])
98199
def add_pkg(pkgs, name, pkgver):
    '''
    
    '''
    try:
        pkgs.setdefault(name, []).append(pkgver)
    except AttributeError as exc:
        log.exception(exc)
569373
private function addRepository(
        RepositoryManager $repoManager, array &$repositories, $repoJson
    ) {
        if (isset($repoJson['type'])) {
            $this->getLogger()->info("Prepending {$repoJson['type']} repository");

            $repository = $repoManager->createRepository($repoJson['type'], $repoJson);

            $repoManager->prependRepository($repository);
            $repositories[] = $repository;
        }
    }
1229289
def get_repos(self):
        
        url_parameters = dict()

        return github.PaginatedList.PaginatedList(
            contentClass=github.Repository.Repository,
            requester=self._requester,
            firstUrl="/installation/repositories",
            firstParams=url_parameters,
            headers=INTEGRATION_PREVIEW_HEADERS,
            list_item='repositories'
        )
1189789
def add_configuration(self, configuration, collect_another_source, done, result, src):
        """"""
        if "includes" in result:
            for include in result["includes"]:
                collect_another_source(include)
        configuration.update(result, source=src)
198747
public function addRepositories(array $repositories)
    {
        foreach ($repositories as $key => $repository) {
            $this->addRepository($key, $repository);
        }
        return $this;
    }
1090831
def list_images(self, repository_name, registry_id=None):
        
        repository = None
        found = False
        if repository_name in self.repositories:
            repository = self.repositories[repository_name]
            if registry_id:
                if repository.registry_id == registry_id:
                    found = True
            else:
                found = True

        if not found:
            raise RepositoryNotFoundException(repository_name, registry_id or DEFAULT_REGISTRY_ID)

        images = []
        for image in repository.images:
            images.append(image)
        return images