portage.repository.config module¶
- class portage.repository.config.RepoConfig(name, repo_opts, local_config=True)¶
Bases:
object
Stores config of one repository
- _eapis_banned¶
- _eapis_deprecated¶
- _masters_orig¶
- static _read_repo_name(repo_path)¶
Read repo_name from repo_path. Returns repo_name, missing.
- static _read_valid_repo_name(repo_path)¶
- aliases¶
- allow_missing_manifest¶
- allow_provide_virtual¶
- auto_sync¶
- cache_formats¶
- clone_depth¶
- create_manifest¶
- disable_manifest¶
- eapi¶
- eapi_is_banned(eapi)¶
- eapi_is_deprecated(eapi)¶
- eclass_db¶
- eclass_locations¶
- eclass_overrides¶
- find_invalid_path_char¶
- force¶
- format¶
- get_pregenerated_cache(auxdbkeys, readonly=True, force=False)¶
Returns the first cache instance yielded from iter_pregenerated_caches(), or None if no cache is available or none of the available formats are supported.
- info_string()¶
Returns a formatted string containing informations about the repository. Used by emerge –info.
- iter_pregenerated_caches(auxdbkeys, readonly=True, force=False)¶
Reads layout.conf cache-formats from left to right and yields cache instances for each supported type that’s found. If no cache-formats are specified in layout.conf, ‘pms’ type is assumed if the metadata/cache directory exists or force is True.
- load_manifest(*args, **kwds)¶
- local_config¶
- location¶
- main_repo¶
- manifest_hashes¶
- manifest_required_hashes¶
- masters¶
- missing_repo_name¶
- module_specific_options¶
- name¶
- portage1_profiles¶
- portage1_profiles_compat¶
- priority¶
- profile_formats¶
- properties_allowed¶
- restrict_allowed¶
- set_module_specific_opt(opt, val)¶
- sign_commit¶
- sign_manifest¶
- strict_misc_digests¶
- sync_allow_hardlinks¶
- sync_depth¶
- sync_hooks_only_on_change¶
- sync_openpgp_key_path¶
- sync_openpgp_key_refresh¶
- sync_openpgp_key_refresh_retry_count¶
- sync_openpgp_key_refresh_retry_delay_exp_base¶
- sync_openpgp_key_refresh_retry_delay_max¶
- sync_openpgp_key_refresh_retry_delay_mult¶
- sync_openpgp_key_refresh_retry_overall_timeout¶
- sync_openpgp_keyserver¶
- sync_rcu¶
- sync_rcu_spare_snapshots¶
- sync_rcu_store_dir¶
- sync_rcu_ttl_days¶
- sync_type¶
- sync_umask¶
- sync_uri¶
- sync_user¶
- thin_manifest¶
- update(new_repo)¶
Update repository with options in another RepoConfig
- update_changelog¶
- user_location¶
- property writable¶
Check if self.location is writable, or permissions are sufficient to create it if it does not exist yet. :rtype: bool :return: True if self.location is writable or can be created,
False otherwise
- class portage.repository.config.RepoConfigLoader(paths, settings)¶
Bases:
object
Loads and store config of several repositories, loaded from PORTDIR_OVERLAY or repos.conf
- static _add_repositories(portdir, portdir_overlay, prepos, ignored_map, local_config, default_portdir)¶
Add overlays in PORTDIR_OVERLAY as repositories
- _check_locations()¶
Check if repositories location are correct and show a warning message if not
- static _parse(paths, prepos, local_config, default_opts)¶
Parse files in paths to load config
- config_string()¶
- get_location_for_name(repo_name)¶
- get_name_for_location(location)¶
- get_repo_for_location(location)¶
- mainRepo()¶
Returns the main repo
- mainRepoLocation()¶
Returns the location of main repo
- repoLocationList()¶
Get a list of repositories location. Replaces PORTDIR_OVERLAY
- repos_with_profiles()¶
- portage.repository.config._find_invalid_path_char(path, pos=0, endpos=None)¶
Returns the position of the first invalid character found in basename, or -1 if no invalid characters are found.
- portage.repository.config._gen_valid_repo(name)¶
Substitute hyphen in place of characters that don’t conform to PMS 3.1.5, and strip hyphen from left side if necessary. This returns None if the given name contains no valid characters.
- portage.repository.config._get_repo_name(repo_location, cached=None)¶
- class portage.repository.config._profile_node(location, portage1_directories, user_config, profile_formats, eapi, allow_build_id, show_deprecated_warning)¶
Bases:
tuple
- _asdict()¶
Return a new dict which maps field names to their values.
- _field_defaults = {}¶
- _fields = ('location', 'portage1_directories', 'user_config', 'profile_formats', 'eapi', 'allow_build_id', 'show_deprecated_warning')¶
- classmethod _make(iterable)¶
Make a new _profile_node object from a sequence or iterable
- _replace(**kwds)¶
Return a new _profile_node object replacing specified fields with new values
- allow_build_id¶
Alias for field number 5
- count(value, /)¶
Return number of occurrences of value.
- eapi¶
Alias for field number 4
- index(value, start=0, stop=9223372036854775807, /)¶
Return first index of value.
Raises ValueError if the value is not present.
- location¶
Alias for field number 0
- portage1_directories¶
Alias for field number 1
- profile_formats¶
Alias for field number 3
- show_deprecated_warning¶
Alias for field number 6
- user_config¶
Alias for field number 2
- portage.repository.config.allow_profile_repo_deps(repo: Union[portage.repository.config.RepoConfig, portage.repository.config._profile_node]) bool ¶
- portage.repository.config.load_repository_config(settings, extra_files=None)¶
- portage.repository.config.parse_layout_conf(repo_location, repo_name=None)¶