treeinfo – Instalable trees metadata

This module provides classes for manipulating .treeinfo files. Treeinfo files provide details about installable trees in Fedora composes and media.


class productmd.treeinfo.TreeInfo
header = None

(productmd.common.Header) – Metadata header

release = None

(Release) – Release details

base_product = None

(BaseProduct) – Base product details (optional)

tree = None

(Tree) – Tree details

variants = None

(Variants) – Release variants

checksums = None

(Checksums) – Checksums of images included in a tree

images = None

(Images) – Paths to images included in a tree

stage2 = None

(Stage2) – Stage 2 image path (for Anaconda installer)

media = None

(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.

  • TypeError – if an attribute has invalid type
  • ValueError – if an attribute contains invalid value
class productmd.treeinfo.Release(metadata)
name = None

(str) – release name, for example: “Fedora”, “Red Hat Enterprise Linux”, “Spacewalk”

short = None

(str) – release short name, for example: “F”, “RHEL”, “Spacewalk”

version = None

(str) – release version, for example: “21”, “7.0”, “2.1”

is_layered = None

(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

class productmd.treeinfo.BaseProduct(metadata)

BaseProduct provides information about operating system a Release runs on.

name = None

(str) – base product name, for example: “Fedora”, “Red Hat Enterprise Linux”

short = None

(str) – base product short name, for example: “F”, “RHEL”

version = None

(str) – base product major version, for example: “21”, “7”

class productmd.treeinfo.Variants(metadata)
class productmd.treeinfo.Variant(metadata)
id = None

(str) – variant ID, for example “Server”, “optional”

uid = None

(str) – variant UID ($parent_UID.$ID), for example “Server”, “Server-optional”

name = None

(str) – variant name, for example “Server”

type = None

(str) – “variant”, “addon”, “optional”

parent = None

(Variant or None) – reference to parent Variant

variants = None

(dict) Variant

paths = None

(VariantPaths) – relative paths to repositories, packages, etc.

class productmd.treeinfo.VariantPaths(variant)

This class stores paths for a variant in a tree. All paths are relative to .treeinfo location.


  • packages – directory with binary RPMs
  • repository – YUM repository with binary RPMs


  • source_packages – directory with source RPMs
  • source_repository – YUM repository with source RPMs


  • debug_packages – directory with debug RPMs
  • debug_repository – YUM repository with debug RPMs
  • identity – path to a pem file which identifies a product


variant = ...
variant.paths.packages = "Packages"
variant.paths.repository = "."
class productmd.treeinfo.Images(metadata)

Return all platforms with available images

class productmd.treeinfo.Stage2(metadata)
mainimage = None

(str) – relative path to Anaconda stage2 image

instimage = None

(str) – relative path to Anaconda instimage (obsolete)

class productmd.treeinfo.Media(metadata)
discnum = None

disc number

totaldiscs = None

number of discs in media set

class productmd.treeinfo.Tree(_metadata)
arch = None

(str) – tree architecture, for example x86_64

build_timestamp = None

(int, float) – tree build time timestamp; format: unix time

platforms = None

(set(str)), supported platforms; for example x86_64,xen

class productmd.treeinfo.Checksums(metadata)