craft_parts.sources.rpm_source module¶
The RPM source handler.
- class craft_parts.sources.rpm_source.RpmSource(source, part_src_dir, *, cache_dir, project_dirs, source_checksum=None, command=None, ignore_patterns=None, **kwargs)[source]¶
Bases:
FileSourceHandler
The “rpm” file source handler.
- Parameters:
source (
str
)part_src_dir (
Path
)cache_dir (
Path
)project_dirs (
ProjectDirs
)source_checksum (
Optional
[str
])command (
Optional
[str
])ignore_patterns (
Optional
[list
[str
]])kwargs (
Any
)
- provision(dst, keep=False, src=None)[source]¶
Extract rpm file contents to the part source dir.
- Parameters:
dst (
Path
)keep (
bool
)src (
Optional
[Path
])
- Return type:
None
- source_model¶
alias of
RpmSourceModel
- class craft_parts.sources.rpm_source.RpmSourceModel(**data)[source]¶
Bases:
BaseFileSourceModel
Pydantic model for an rpm file source.
- Parameters:
data (
Any
)
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function get_model_config.<locals>.<lambda>>, 'extra': 'forbid', 'frozen': True, 'json_schema_extra': {'if': {'not': {'required': ['source-type']}}, 'then': {'properties': {'source': {'pattern': '\\.rpm$'}}}}}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'source': FieldInfo(annotation=str, required=True, alias='source', alias_priority=1), 'source_checksum': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias='source-checksum', alias_priority=1), 'source_type': FieldInfo(annotation=Literal['rpm'], required=False, default='rpm', alias='source-type', alias_priority=1)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- source: str¶
- source_checksum: str | None¶
-
source_type:
Literal
['rpm'
]¶