module RPM

Defined in:

rpm.cr
rpm/dependency.cr
rpm/fd.cr
rpm/file.cr
rpm/librpm.cr
rpm/match_iterator.cr
rpm/package.cr
rpm/problem.cr
rpm/source.cr
rpm/spec.cr
rpm/tagdata.cr
rpm/transaction.cr
rpm/version.cr

Constant Summary

MACROFILES = String.new(LibRPM.macrofiles)

Default macro files

PKGVERSION = "4.16.0"

The version of librpm which is used at compiled time.

PKGVERSION_COMP = "4.16.0"

Comparable version of PKGVERSION by compare_versions().

PKGVERSION_EXTRA = 0

If PKGVERSION has 4 parts, PKGVERSION_EXTRA contains the fourth part. For example, if the version is 4.14.2.1, PKGVERSION_EXTRA will be set to 1.

PKGVERSION_EXTRA will be 0 if fourth part does not exist.

PKGVERSION_MAJOR = 4

Major version part of PKGVERSION

PKGVERSION_MINOR = 16

Minor version part of PKGVERSION

PKGVERSION_PATCH = 0

Patch version part of PKGVERSION

RPMVERSION = String.new(LibRPM.rpmversion)

Runtime Version of RPM Library (cf. RPM::PKGVERSION is compile-time version)

VERSION = "0.1.0"

Version of crystal binding

Class Method Summary

Class Method Detail

def self.[](name : String) #

Read macro

Raises KeyError when specified name is not defined


[View source]
def self.[]=(name : String, value : String?) #

Write macro


[View source]
def self.[]?(name : String) #

Read macro

Return nil if specified name is not defined.


[View source]
def self.pop_macro(mc, n) : Int #

Remove macro definition

  • Calls rpmPopMacro() for RPM 4.14 or later,
  • Calls delMacro() for otherwise

[View source]
def self.push_macro(mc, n, o, b, level) : Int #

Add macro definitiion

  • Calls rpmPushMacro() for RPM 4.14 or later,
  • Calls addMacro() for otherwise

[View source]
def self.read_config_files(file : String? = nil, target : String? = nil) #

Reads RPM config files

If nil given for each parameters, read the current system's default value


[View source]
def self.rpm_version_code : UInt32 #

Calculate version code.

DEPRECATED Use RPMVERSION


[View source]
def self.rpmtd_type(ptr) : TagType #

Return TagType in the TagData pointer.

  • Returns the value returned by rpmtdType as-is for RPM 4.9 or later.
  • Returns the value filtered out return type from returned value of rpmtdType for RPM 4.8.

[View source]
def self.tag_get_return_type(v) : TagReturnType #

Return Tag Return Type for a tag

  • Calls rpmTagGetReturnType() for RPM 4.9 or later,
  • Calls rpmTagGetType() and mask for RPM 4.8

[View source]
def self.tag_type(v) : TagType #

Return Tag Type for a Tag

  • Calls rpmTagGetTagType() for RPM 4.9 or later,
  • Calls rpmTagGetType() and mask for RPM 4.8

[View source]
def self.transaction(root = "/", &) #

[View source]