Class RPM::File
In: lib/arr-pm/file.rb
Parent: Object

Much of the code here is derived from knowledge gained by reading the rpm source code, but mostly it started making more sense after reading this site: www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html

Methods

config_files   conflicts   extract   files   header   lead   mask?   new   operator   payload   provides   relation   requires   signature   tags  

Constants

FLAG_LESS = (1 << 1)
FLAG_GREATER = (1 << 2)
FLAG_EQUAL = (1 << 3)
FLAG_CONFIG_FILE = (1 << 0)   from rpm/rpmfi.h

Attributes

file  [R] 

Public Class methods

Public Instance methods

Get an array of config files

Get an array of conflicts defined in this package.

@return Array of [ [name, operator, version], … ]

Extract this RPM to a target directory.

This should have roughly the same effect as:

  % rpm2cpio blah.rpm | (cd {target}; cpio -i --make-directories)

List the files in this RPM.

This should have roughly the same effect as:

  % rpm2cpio blah.rpm | cpio -it

Return the header for this rpm.

Return the lead for this rpm

This ‘lead’ structure is almost entirely deprecated in the RPM file format.

Returns a file descriptor for the payload. On first invocation, it seeks to the start of the payload

Get an array of provides defined in this package.

@return Array of [ [name, operator, version], … ]

Get all relations of a given type to this package.

Examples:

    rpm.relation(:require)
    rpm.relation(:conflict)
    rpm.relation(:provide)

In the return array-of-arrays, the elements are: [ name (string), operator (string), version (string) ]

operator will be ">=", ">", "=", "<", or "<="

@return Array of [name, operator, version]

Get an array of requires defined in this package.

@return Array of [ [name, operator, version], … ]

Return the signature header for this rpm

[Validate]