rpms – RPM metadata

This module provides classes for manipulating rpms.json files. rpms.json files provide details about RPMs included in composes.

Classes

class productmd.rpms.Rpms
add(variant, arch, nevra, path, sigkey, category, srpm_nevra=None)

Map RPM to to variant and arch.

Parameters:
  • variant (str) – compose variant UID
  • arch (str) – compose architecture
  • nevra (str) – name-epoch:version-release.arch
  • sigkey (str or None) – sigkey hash
  • category (str) – RPM category, one of binary, debug, source
  • srpm_nevra (str) – name-epoch:version-release.arch of RPM’s SRPM
dump(f)

Dump data to a file.

Parameters:f (file or str) – file-like object or path to file
dumps()

Dump data to a string.

Return type:str
load(f)

Load data from a file.

Parameters:f (file or str) – file-like object or path to file
loads(s)

Load data from a string.

Parameters:s (str) – input data
validate()

Validate attributes by running all self._validate_*() methods.

Raises:
  • TypeError – if an attribute has invalid type
  • ValueError – if an attribute contains invalid value

Table Of Contents

Previous topic

images – Image metadata

Next topic

treeinfo – Instalable trees metadata

This Page