rpm
4.5
|
![]() |
Files | |
file | rpmlib.h |
In Memoriam: Steve Taylor stayl was here, now he's not. or@r edhat .com | |
file | macro.c |
Functions | |
static void | rpmSetVar (int var, const char *val) |
Set value of an rpmrc variable. More... | |
static int | rpmReadRC (const char *rcfiles) |
Read rpmrc (and macro) configuration file(s). More... | |
Variables | |
const char * | rpmMacrofiles |
List of macro files to read when configuring rpm. More... | |
RPMRC | |
enum | rpm_machtable_e { RPM_MACHTABLE_INSTARCH = 0, RPM_MACHTABLE_INSTOS = 1, RPM_MACHTABLE_BUILDARCH = 2, RPM_MACHTABLE_BUILDOS = 3 } |
Build and install arch/os table identifiers. More... | |
const char * | rpmRcfiles |
The default rpmrc files to be read. More... | |
int | rpmReadConfigFiles (const char *file, const char *target) |
Read macro configuration file(s) for a target. More... | |
void | rpmGetArchInfo (const char **name, int *num) |
void | rpmGetOsInfo (const char **name, int *num) |
int | rpmMachineScore (int type, const char *name) |
int | rpmPlatformScore (const char *platform, void *mi_re, int mi_nre) |
Return score of a platform string. More... | |
int | rpmShowRC (FILE *fp) |
Display current rpmrc (and macro) configuration. More... | |
void | rpmSetTables (int archTable, int osTable) |
void | rpmSetMachine (const char *arch, const char *os) |
Set current arch/os names. More... | |
void | rpmFreeRpmrc (void) |
Destroy rpmrc arch/os compatibility tables. More... | |
enum rpm_machtable_e |
Build and install arch/os table identifiers.
void rpmFreeRpmrc | ( | void | ) |
Destroy rpmrc arch/os compatibility tables.
< No. of arch/os tables.
Definition at line 1823 of file rpmrc.c.
References _free(), rpmvarValue::arch, ARCH, machCache_s::cache, tableType_s::cache, tableType_s::canons, tableType_s::canonsLength, machCacheEntry_s::count, machEquivTable_s::count, tableType_s::defaults, tableType_s::defaultsLength, defaultEntry_s::defName, tableType_s::equiv, machCacheEntry_s::equivs, machEquivTable_s::list, mireFreeAll(), machCacheEntry_s::name, machEquivInfo_s::name, defaultEntry_s::name, canonEntry_s::name, next, rpmvarValue::next, nplatpat, OS, platpat, RPM_MACHTABLE_COUNT, RPMVAR_NUM, canonEntry_s::short_name, machCache_s::size, rpmvarValue::value, and values.
Referenced by main(), rpmcliFini(), and rpmspecQuery().
void rpmGetArchInfo | ( | const char ** | name, |
int * | num | ||
) |
name | address of arch name (or NULL) |
num | address of arch number (or NULL) |
Definition at line 1712 of file rpmrc.c.
References ARCH, and getMachineInfo().
void rpmGetOsInfo | ( | const char ** | name, |
int * | num | ||
) |
name | address of os name (or NULL) |
num | address of os number (or NULL) |
Definition at line 1717 of file rpmrc.c.
References getMachineInfo(), and OS.
int rpmMachineScore | ( | int | type, |
const char * | name | ||
) |
type | any of the RPM_MACHTABLE_* constants |
name | name |
Definition at line 1616 of file rpmrc.c.
References _free(), RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS, RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS, rpmExpand(), and rpmPlatformScore().
int rpmPlatformScore | ( | const char * | platform, |
void * | mi_re, | ||
int | mi_nre | ||
) |
Return score of a platform string.
A platform score measures the "nearness" of a platform string wrto configured platform patterns. The returned score is the line number of the 1st pattern in /etc/rpm/platform that matches the input string.
platform | cpu-vendor-os platform string |
mi_re | pattern array (NULL uses /etc/rpm/platform patterns) |
mi_nre | no. of patterns |
Definition at line 1061 of file rpmrc.c.
References nplatpat, and platpat.
Referenced by archScore(), platformScore(), rpmMachineScore(), and rpmtsAddInstallElement().
int rpmReadConfigFiles | ( | const char * | file, |
const char * | target | ||
) |
Read macro configuration file(s) for a target.
file | colon separated files to read (NULL uses default) |
target | target platform (NULL uses default) |
Definition at line 2008 of file rpmrc.c.
References _free(), configTarget, rpmExpand(), rpmReadRC(), rpmRebuildTargetVars(), and rpmSetMachine().
Referenced by init_rpm(), main(), rpmcliConfigured(), and rpmspecQuery().
|
static |
Read rpmrc (and macro) configuration file(s).
rcfiles | colon separated files to read (NULL uses default) |
Definition at line 1899 of file rpmrc.c.
References _, _free(), doReadRC(), Ferror(), Fopen(), Fstrerror(), getenv(), RPMERR_RPMRC, rpmError, rpmExpand(), rpmGetVarArch(), rpmInitMacros(), rpmMacrofiles, rpmRcfiles, RPMVAR_MACROFILES, setDefaults(), and xstrdup().
Referenced by rpmReadConfigFiles().
void rpmSetMachine | ( | const char * | arch, |
const char * | os | ||
) |
Set current arch/os names.
NULL as argument is set to the default value (munged uname()) pushed through a translation table (if appropriate).
arch | arch name (or NULL) |
os | os name (or NULL) |
Definition at line 1650 of file rpmrc.c.
References _free(), ARCH, defaultMachine(), lookupInDefaultTable(), OS, rebuildCompatTables(), and xstrdup().
Referenced by rpmReadConfigFiles(), rpmRebuildTargetVars(), and rpmShowRC().
void rpmSetTables | ( | int | archTable, |
int | osTable | ||
) |
archTable | |
osTable |
Definition at line 1597 of file rpmrc.c.
References ARCH, defaultMachine(), OS, and rebuildCompatTables().
Referenced by rpmRebuildTargetVars(), and rpmShowRC().
|
static |
Set value of an rpmrc variable.
Definition at line 502 of file rpmrc.c.
References freeRpmVar(), rpmvarValue::value, values, and xstrdup().
Referenced by setPathDefault(), and setVarDefault().
int rpmShowRC | ( | FILE * | fp | ) |
Display current rpmrc (and macro) configuration.
fp | output file handle |
Definition at line 2045 of file rpmrc.c.
References _, _free(), ARCH, machEquivTable_s::count, tableType_s::equiv, machEquivTable_s::list, machEquivInfo_s::name, rpmOption::name, optionTableSize, OS, RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS, RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS, rpmcliRcfile, rpmdsCpuinfo(), rpmdsDNEVR(), rpmdsFree(), rpmdsFreePRCO(), rpmdsFromPRCO(), rpmdsGetconf(), rpmdsInit(), rpmdsNewPRCO(), rpmdsNext(), rpmdsRpmlib(), rpmdsSysinfo(), rpmdsUname(), rpmDumpMacroTable(), rpmExpand(), rpmGetVarArch(), rpmIsDebug, rpmIsVerbose, rpmMacrofiles, rpmSetMachine(), rpmSetTables(), RPMTAG_PROVIDENAME, and rpmOption::var.
Referenced by rpmcliAllArgCallback().
const char* rpmMacrofiles |
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 '//'.
Definition at line 61 of file macro.c.
Referenced by rpmReadRC(), and rpmShowRC().
const char* rpmRcfiles |
The default rpmrc files to be read.
Definition at line 28 of file rpmrc.c.
Referenced by rpmReadRC().