This module provides classes for manipulating .treeinfo files. Treeinfo files provide details about installable trees in Fedora composes and media.
(productmd.common.Header) – Metadata header
(BaseProduct) – Base product details (optional)
(Tree) – Tree details
(Checksums) – Checksums of images included in a tree
(Stage2) – Stage 2 image path (for Anaconda installer)
(Media) – Media set information (optional)
Dump data to a file.
Parameters: | f (file or str) – file-like object or path to file |
---|
Dump data to a string.
Return type: | str |
---|
Load data from a file.
Parameters: | f (file or str) – file-like object or path to file |
---|
Load data from a string.
Parameters: | s (str) – input data |
---|
Validate attributes by running all self._validate_*() methods.
Raises: |
|
---|
(str) – release name, for example: “Fedora”, “Red Hat Enterprise Linux”, “Spacewalk”
(str) – release short name, for example: “F”, “RHEL”, “Spacewalk”
(str) – release version, for example: “21”, “7.0”, “2.1”
(bool) – typically False for an operating system, True otherwise
Version string without the last part. For example: version == 1.2.0 -> major_version == 1.2
Last part of the version string. For example: version == 1.2.0 -> minor_version == 0
BaseProduct provides information about operating system a Release runs on.
(str) – base product name, for example: “Fedora”, “Red Hat Enterprise Linux”
(str) – base product short name, for example: “F”, “RHEL”
(str) – base product major version, for example: “21”, “7”
(str) – variant ID, for example “Server”, “optional”
(str) – variant UID ($parent_UID.$ID), for example “Server”, “Server-optional”
(str) – variant name, for example “Server”
(str) – “variant”, “addon”, “optional”
(VariantPaths) – relative paths to repositories, packages, etc.
This class stores paths for a variant in a tree. All paths are relative to .treeinfo location.
Binary
- packages – directory with binary RPMs
- repository – YUM repository with binary RPMs
Source
- source_packages – directory with source RPMs
- source_repository – YUM repository with source RPMs
Debug
- debug_packages – directory with debug RPMs
- debug_repository – YUM repository with debug RPMs
Example:
variant = ...
variant.paths.packages = "Packages"
variant.paths.repository = "."