fedrq.config¶
This module houses code to load configuration from the filesystem and validate it.
LoadFilelists ¶
Bases: StrEnum
RQConfig ¶
Bases: BaseModel
Config ¶
get_dnf_rq ¶
get_dnf_rq(
branch: str | None = None,
repo: str | None = None,
base_conf: dict[str, t.Any] | None = None,
base_vars: dict[str, t.Any] | None = None,
) -> _dnfRepoquery
Shortcut to create a Repoquery object using the dnf backend
Source code in src/fedrq/config.py
get_libdnf5_rq ¶
get_libdnf5_rq(
branch: str | None = None,
repo: str | None = None,
base_conf: dict[str, t.Any] | None = None,
base_vars: dict[str, t.Any] | None = None,
) -> _libdnf5RepoQuery
Shortcut to create a Repoquery object using the libdnf5 backend
Source code in src/fedrq/config.py
get_release ¶
Source code in src/fedrq/config.py
get_rq ¶
get_rq(
branch: str | None = None,
repo: str | None = None,
base_conf: dict[str, t.Any] | None = None,
base_vars: dict[str, t.Any] | None = None,
) -> RepoqueryBase[PackageCompat]
Higher level interface that finds the Release object that mathces {branch} and {repo}, creates a (lib)dnf(5).base.Base session, and returns a Repoquery object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
branch
|
str | None
|
branch name |
None
|
repo
|
str | None
|
repo class. defaults to ‘base’. |
None
|
base_conf
|
dict[str, Any] | None
|
Base session configuration |
None
|
base_vars
|
dict[str, Any] | None
|
Base session vars/substitutions (arch, basearch, releasever, etc.) |
None
|
Source code in src/fedrq/config.py
Release ¶
Encapsulates a ReleaseConfig with a specific version and repo name.
This SHOULD NOT be instantiated directly.
The init() has no stability promises.
Use the RQConfig.get_release()
factory instead.
Source code in src/fedrq/config.py
get_repog ¶
make_base ¶
make_base(
config: RQConfig | None = None,
base_conf: dict[str, t.Any] | None = None,
base_vars: dict[str, t.Any] | None = None,
base_maker: BaseMakerBase | None = None,
fill_sack: bool = True,
) -> dnf.Base | libdnf5.base.Base
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
|
RQConfig | None
|
An RQConfig object. If this is not passed, |
None
|
base_conf
|
dict[str, Any] | None
|
Base session configuration |
None
|
base_vars
|
dict[str, Any] | None
|
Base session vars/substitutions (arch, basearch, releasever, etc.) |
None
|
base_maker
|
BaseMakerBase | None
|
Existing BaseMaker object to configure. If base_maker is None, a new one will be created. |
None
|
fill_sack
|
bool
|
Whether to fill the Base object’s package sack or just return the Base object after applying configuration. |
True
|
Source code in src/fedrq/config.py
ReleaseConfig ¶
get_config ¶
Retrieve config files from CONFIG_DIRS and fedrq.data. Perform naive top-level merging of the ‘releases’ table.