rpm: RPMRC.

rpm 4.19.1.1 The RPM Package Manager

Loading...
Searching...
No Matches
Files | Variables
RPMRC.
I/O

Reading config files and getting some important configuration values. More...

Collaboration diagram for RPMRC.:

## Files
file | rpmlib.h

## Variables
const char * | macrofiles

## RPMRC
enum | rpm_machtable_e { RPM_MACHTABLE_INSTARCH = 0 , RPM_MACHTABLE_INSTOS = 1 , RPM_MACHTABLE_BUILDARCH = 2 , RPM_MACHTABLE_BUILDOS = 3 }
int | rpmReadConfigFiles (const char *file, const char *target)
void | rpmGetArchInfo (const char **name, int *num)
int | rpmGetArchColor (const char *arch)
void | rpmGetOsInfo (const char **name, int *num)
int | rpmMachineScore (int type, const char *name)
int | rpmShowRC (FILE *fp)
void | rpmFreeRpmrc (void)

## Detailed Description

Reading config files and getting some important configuration values.

## Enumeration Type Documentation

## ◆ rpm_machtable_e

enum rpm_machtable_e

Build and install arch/os table identifiers.

Todo:
  Eliminate from API.

Enumerator
RPM_MACHTABLE_INSTARCH | Install platform architecture.
RPM_MACHTABLE_INSTOS | Install platform operating system.
RPM_MACHTABLE_BUILDARCH | Build platform architecture.
RPM_MACHTABLE_BUILDOS | Build platform operating system.

## Function Documentation

## ◆ rpmFreeRpmrc()

void rpmFreeRpmrc | ( | void |  | ) |

Destroy rpmrc arch/os compatibility tables.

Todo:
  Eliminate from API.

## ◆ rpmGetArchColor()

int rpmGetArchColor | ( | const char * | arch | ) |

Return color for an arch

Parameters

  arch | name of an architecture

Returns
  color color of arch, -1 if the arch couldn't be determined

## ◆ rpmGetArchInfo()

void rpmGetArchInfo | ( | const char ** | name,
|  | int * | num
| ) |  |

Return current arch name and/or number.

Todo:
  Generalize to extract arch component from target_platform macro.

Parameters

  [out] | name | address of arch name (or NULL)
  [out] | num | address of arch number (or NULL)

## ◆ rpmGetOsInfo()

void rpmGetOsInfo | ( | const char ** | name,
|  | int * | num
| ) |  |

Return current os name and/or number.

Todo:
  Generalize to extract os component from target_platform macro.

Parameters

  [out] | name | address of os name (or NULL)
  [out] | num | address of os number (or NULL)

## ◆ rpmMachineScore()

int rpmMachineScore | ( | int | type,
|  | const char * | name
| ) |  |

Return arch/os score of a name. An arch/os score measures the "nearness" of a name to the currently running (or defined) platform arch/os. For example, the score of arch "i586" on an i686 platform is (usually) 2. The arch/os score is used to select one of several otherwise identical packages using the arch/os tags from the header as hints of the intended platform for the package.

Todo:
  Rewrite to use RE's against config.guess target platform output.

Parameters

  type | any of the RPM_MACHTABLE_* constants
  name | name

Returns
  arch score (0 is no match, lower is preferred)

## ◆ rpmReadConfigFiles()

int rpmReadConfigFiles | ( | const char * | file,
|  | const char * | target
| ) |  |

Read macro configuration file(s) for a target.

Parameters

  file | colon separated files to read (NULL uses default)
  target | target platform (NULL uses default)

Returns
  0 on success, -1 on error

## ◆ rpmShowRC()

int rpmShowRC | ( | FILE * | fp | ) |

Display current rpmrc (and macro) configuration.

Parameters

  fp | output file handle

Returns
  0 always

## Variable Documentation

## ◆ macrofiles

const char* macrofiles
| extern

List of macro files to read when configuring rpm. This is a colon separated list of files. URI's are permitted as well, identified by the token '://', so file paths must not begin with '//'.