rpm
5.4.15
|
#include <stdio.h>
Go to the source code of this file.
Functions | |
int | rpmReadConfigFiles (const char *file, const char *target) |
Read macro configuration file(s) for a target. More... | |
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 | rpmFreeRpmrc (void) |
Variables | |
void * | platpat |
int | nplatpat |
void rpmFreeRpmrc | ( | void | ) |
Eliminate in rpm-5.1. Destroy rpmrc arch/os compatibility tables.
Eliminate from API.
< No. of arch/os tables.
Definition at line 1006 of file rpmrc.c.
References _free(), ARCH, machCache_s::cache, tableType_s::cache, tableType_s::canons, tableType_s::canonsLength, machCacheEntry_s::count, machEquivTable_s::count, current, tableType_s::defaults, defaultsInitialized, tableType_s::defaultsLength, defaultEntry_s::defName, tableType_s::equiv, machCacheEntry_s::equivs, i, j, machEquivTable_s::list, mireFreeAll(), machCacheEntry_s::name, machEquivInfo_s::name, defaultEntry_s::name, canonEntry_s::name, nplatpat, OS, platpat, RPM_MACHTABLE_COUNT, canonEntry_s::short_name, and machCache_s::size.
Referenced by main(), rpmcliFini(), and rpmspecQuery().
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 653 of file rpmrc.c.
References i, mireRegexec(), nplatpat, and platpat.
Referenced by archScore(), getMachineInfo(), platformScore(), and rpmtsAddInstallElement().
int rpmReadConfigFiles | ( | const char * | file, |
const char * | target | ||
) |
Read macro configuration file(s) for a target.
file | NULL always |
target | target platform (NULL uses default) |
Definition at line 1095 of file rpmrc.c.
References _free(), configTarget, mode, rpmExpand(), rpmluaextActivate(), rpmluaGetGlobalState(), rpmluaGetPrintBuffer(), rpmMacrofiles, rpmReadRC(), rpmRebuildTargetVars(), and rpmSetMachine().
Referenced by Init_rpm(), init_rpm(), main(), rpmcliConfigured(), and rpmspecQuery().
int rpmShowRC | ( | FILE * | fp | ) |
Display current rpmrc (and macro) configuration.
fp | output file handle |
Definition at line 1145 of file rpmrc.c.
References _, _free(), _sysinfo_path, ARCH, machEquivTable_s::count, cpuinfoP, current, tableType_s::equiv, i, machEquivTable_s::list, machEquivInfo_s::name, nplatpat, OS, pattern, platpat, RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS, RPM_MACHTABLE_INSTOS, rpmdsCpuinfo(), rpmdsDNEVR(), rpmdsFree(), rpmdsFreePRCO(), rpmdsFromPRCO(), rpmdsGetconf(), rpmdsInit(), rpmdsLink(), rpmdsNewPRCO(), rpmdsNext(), rpmdsRpmlib(), rpmdsSysinfo(), rpmdsUname(), rpmDumpMacroTable(), rpmExpand(), rpmIsDebug, rpmIsVerbose, rpmluaFiles, rpmluaPath, rpmMacrofiles, and RPMTAG_PROVIDENAME.
Referenced by rpmcliAllArgCallback().
int nplatpat |
Definition at line 46 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), rpmShowRC(), and rpmtsAddInstallElement().
void* platpat |
Definition at line 44 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), rpmShowRC(), and rpmtsAddInstallElement().