rpm
5.4.14
|
#include "system.h"
#include <stdarg.h>
#include <rpmio.h>
#include <rpmcb.h>
#include <mire.h>
#include <argv.h>
#include <rpmlua.h>
#include <rpmluaext.h>
#include <rpmmacro.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include <rpmevr.h>
#include <rpmds.h>
#include <rpmcli.h>
#include <rpmsyck.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | machCacheEntry_s |
struct | machCache_s |
struct | machEquivInfo_s |
struct | machEquivTable_s |
struct | defaultEntry_s |
struct | canonEntry_s |
struct | tableType_s |
struct | cpu_vendor_os_gnu |
Macros | |
#define | __power_pc() 0 |
#define | _RPMIOB_INTERNAL /* XXX for rpmiobSlurp */ |
#define | _MIRE_INTERNAL |
#define | _RPMEVR_INTERNAL |
#define | _RPMDS_INTERNAL |
#define | RPM_MACHTABLE_COUNT 4 |
#define | OS 0 |
#define | ARCH 1 |
#define | _TOPDIRMACRO "%{_topdir}/" |
Typedefs | |
typedef const char * | cptr_t |
typedef struct machCacheEntry_s * | machCacheEntry |
typedef struct machCache_s * | machCache |
typedef struct machEquivInfo_s * | machEquivInfo |
typedef struct machEquivTable_s * | machEquivTable |
typedef struct defaultEntry_s * | defaultEntry |
typedef struct canonEntry_s * | canonEntry |
typedef struct tableType_s * | tableType |
typedef struct cpu_vendor_os_gnu * | CVOG_t |
Enumerations | |
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... | |
Functions | |
static void | rpmRebuildTargetVars (const char **target, const char **canontarget) |
if (!strcmp(cache->cache[i].name, key)) return cache-> cache+i | |
static void | machAddEquiv (machEquivTable table, const char *name, int distance) |
static void | machCacheEntryVisit (machCache cache, machEquivTable table, const char *name, int distance) |
static void | rebuildCompatTables (int type, const char *name) |
static canonEntry | lookupInCanonTable (const char *name, const canonEntry table, int tableLen) |
static const char * | lookupInDefaultTable (const char *name, const defaultEntry table, int tableLen) |
static void | addMacroDefault (const char *macroname, const char *val, const char *body) |
static void | setPathDefault (const char *macroname, const char *subdir) |
static void | setDefaults (void) |
static int | parseCVOG (const char *str, CVOG_t *cvogp) |
static rpmRC | rpmPlatform (const char *platform) |
Read and configure /etc/rpm/platform patterns. More... | |
int | rpmPlatformScore (const char *platform, void *mi_re, int mi_nre) |
static void | defaultMachine (const char **arch, const char **os) |
static void | rpmSetTables (int archTable, int osTable) |
static void | rpmSetMachine (const char *arch, const char *os) |
static void | getMachineInfo (int type, const char **name, int *num) |
void | rpmFreeRpmrc (void) |
static int | rpmReadRC (const char *macrofiles) |
Read macro configuration file(s). More... | |
int | rpmReadConfigFiles (const char *file, const char *target) |
int | rpmShowRC (FILE *fp) |
Variables | |
static const char * | configTarget = NULL |
static const char * | platform = SYSCONFIGDIR "/platform" |
void * | platpat = NULL |
int | nplatpat = 0 |
rpmds | cpuinfoP |
static struct tableType_s | tables [4] |
static cptr_t | current [2] |
static int | currTables [2] = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH } |
static int | defaultsInitialized = 0 |
return | NULL |
static const char * | ___build_pre |
#define _RPMIOB_INTERNAL /* XXX for rpmiobSlurp */ |
#define _TOPDIRMACRO "%{_topdir}/" |
Referenced by setPathDefault().
#define ARCH 1 |
Definition at line 125 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmRebuildTargetVars(), rpmSetMachine(), rpmSetTables(), and rpmShowRC().
#define OS 0 |
Definition at line 124 of file rpmrc.c.
Referenced by rpmFreeRpmrc(), rpmRebuildTargetVars(), rpmSetMachine(), rpmSetTables(), and rpmShowRC().
#define RPM_MACHTABLE_COUNT 4 |
typedef struct canonEntry_s * canonEntry |
typedef struct cpu_vendor_os_gnu * CVOG_t |
typedef struct defaultEntry_s * defaultEntry |
typedef struct machCache_s * machCache |
static machCacheEntry |
typedef struct machEquivInfo_s * machEquivInfo |
typedef struct machEquivTable_s * machEquivTable |
typedef struct tableType_s * tableType |
|
static |
Definition at line 271 of file rpmrc.c.
References addMacro(), NULL, RMIL_DEFAULT, and val.
Referenced by setDefaults().
|
static |
Definition at line 674 of file rpmrc.c.
References _free(), configTarget, cpu_vendor_os_gnu::cpu, n, NULL, cpu_vendor_os_gnu::os, parseCVOG(), platform, rc, rpmExpand(), rpmGetPath(), rpmPlatform(), RPMRC_OK, s, sprintf(), cpu_vendor_os_gnu::str, and strncpy().
Referenced by rpmRebuildTargetVars(), rpmSetMachine(), and rpmSetTables().
Definition at line 879 of file rpmrc.c.
References _free(), ARCH, argvCount(), argvFree(), argvSplit(), current, currTables, i, j, lookupInCanonTable(), n, name, nplatpat, NULL, canonEntry_s::num, platpat, rpmExpand(), rpmPlatformScore(), canonEntry_s::short_name, type, and void.
Referenced by rpmRebuildTargetVars().
if | ( | ! | strcmpcache->cache[i].name, key | ) | -> cache+i |
|
static |
Definition at line 241 of file rpmrc.c.
References NULL, and strcmp().
Referenced by getMachineInfo().
|
static |
Definition at line 258 of file rpmrc.c.
References defaultEntry_s::defName, name, and strcmp().
Referenced by rpmSetMachine().
|
static |
Definition at line 161 of file rpmrc.c.
References machEquivTable_s::count, tableType_s::equiv, i, machEquivTable_s::list, machEquivInfo_s::name, NULL, machEquivInfo_s::score, xmalloc, xrealloc, xstrcasecmp(), and xstrdup().
Referenced by machCacheEntryVisit(), and rebuildCompatTables().
|
static |
Definition at line 189 of file rpmrc.c.
References machCacheEntry_s::count, machCacheEntry_s::equivs, i, machAddEquiv(), and machCacheEntry_s::visited.
Referenced by rebuildCompatTables().
Definition at line 383 of file rpmrc.c.
References _free(), cpu_vendor_os_gnu::cpu, cpu_vendor_os_gnu::gnu, cpu_vendor_os_gnu::os, p, cpu_vendor_os_gnu::str, cpu_vendor_os_gnu::vendor, xcalloc(), and xstrdup().
Referenced by defaultMachine(), and rpmPlatform().
Definition at line 210 of file rpmrc.c.
References _free(), machCache_s::cache, tableType_s::cache, machEquivTable_s::count, currTables, tableType_s::equiv, i, key, machEquivTable_s::list, machAddEquiv(), machCacheEntryVisit(), name, machEquivInfo_s::name, machCache_s::size, type, machCacheEntry_s::visited, and while().
Referenced by rpmSetMachine(), and rpmSetTables().
< 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, k, machEquivTable_s::list, mireFreeAll(), machCacheEntry_s::name, machEquivInfo_s::name, defaultEntry_s::name, canonEntry_s::name, nplatpat, NULL, OS, platpat, RPM_MACHTABLE_COUNT, canonEntry_s::short_name, machCache_s::size, t, and void.
Referenced by main(), and rpmspecQuery().
|
static |
Read and configure /etc/rpm/platform patterns.
platform | path to platform patterns |
Definition at line 440 of file rpmrc.c.
References _free(), addMacro(), cpu_vendor_os_gnu::cpu, exit, for(), cpu_vendor_os_gnu::gnu, mireAppend(), mireFreeAll(), nplatpat, NULL, cpu_vendor_os_gnu::os, p, parseCVOG(), platpat, rc, rpmExpand(), rpmiobFree(), rpmiobSlurp(), RPMMIRE_REGEX, RPMMIRE_STRCMP, RPMRC_FAIL, RPMRC_OK, cpu_vendor_os_gnu::str, t, cpu_vendor_os_gnu::vendor, xisspace(), and xx.
Referenced by defaultMachine().
Definition at line 653 of file rpmrc.c.
References i, mireRegexec(), nplatpat, NULL, and platpat.
Referenced by archScore(), getMachineInfo(), platformScore(), and rpmtsAddInstallElement().
int rpmReadConfigFiles | ( | const char * | file, |
const char * | target | ||
) |
Definition at line 1095 of file rpmrc.c.
References _free(), configTarget, mode, NULL, rpmExpand(), rpmluaGetGlobalState(), rpmluaGetPrintBuffer(), rpmMacrofiles, rpmReadRC(), rpmRebuildTargetVars(), rpmSetMachine(), and void.
Referenced by Init_rpm(), init_rpm(), main(), rpmcliConfigured(), and rpmspecQuery().
|
static |
Definition at line 921 of file rpmrc.c.
References _free(), addMacro(), ARCH, c, defaultMachine(), delMacro(), getMachineInfo(), NULL, o, OS, RMIL_RPMRC, RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS, RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS, rpmSetMachine(), rpmSetTables(), sprintf(), xmalloc, xstrcasecmp(), xstrdup(), and xtolower().
Referenced by rpmReadConfigFiles().
|
static |
Definition at line 838 of file rpmrc.c.
References _free(), ARCH, assert(), current, currTables, defaultMachine(), lookupInDefaultTable(), NULL, OS, rebuildCompatTables(), strcmp(), t, and xstrdup().
Referenced by rpmReadConfigFiles(), and rpmRebuildTargetVars().
int rpmShowRC | ( | FILE * | fp | ) |
Definition at line 1145 of file rpmrc.c.
References _, _free(), _sysinfo_path, ARCH, machEquivTable_s::count, cpuinfoP, current, ds, tableType_s::equiv, fn, fprintf(), i, machEquivTable_s::list, machEquivInfo_s::name, nplatpat, NULL, OS, pattern, platpat, PRCO, 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, RPMTAG_PROVIDENAME, s, void, and xx.
Referenced by rpmcliAllArgCallback().
Definition at line 320 of file rpmrc.c.
References addMacro(), addMacroDefault(), NULL, RMIL_DEFAULT, setPathDefault(), USRPREFIX, and VARPREFIX.
Referenced by rpmReadRC().
|
static |
Definition at line 281 of file rpmrc.c.
References _TOPDIRMACRO, addMacro(), alloca(), NULL, and RMIL_DEFAULT.
Referenced by setDefaults().
|
static |
|
static |
Definition at line 38 of file rpmrc.c.
Referenced by defaultMachine(), and rpmReadConfigFiles().
rpmds cpuinfoP |
Definition at line 852 of file depends.c.
Referenced by rpmShowRC().
|
static |
Definition at line 128 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmSetMachine(), and rpmShowRC().
|
static |
Definition at line 131 of file rpmrc.c.
Referenced by getMachineInfo(), rebuildCompatTables(), rpmSetMachine(), and rpmSetTables().
|
static |
Definition at line 134 of file rpmrc.c.
Referenced by rpmFreeRpmrc(), and rpmReadRC().
int nplatpat = 0 |
Definition at line 46 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), rpmShowRC(), and rpmtsAddInstallElement().
|
static |
Definition at line 41 of file rpmrc.c.
Referenced by archScore(), defaultMachine(), parseSpec(), platformScore(), and rpmtsAddInstallElement().
Definition at line 44 of file rpmrc.c.
Referenced by getMachineInfo(), rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), rpmShowRC(), and rpmtsAddInstallElement().
|
static |