#include "system.h"#include <stdarg.h>#include <rpmlib.h>#include <rpmmacro.h>#include "misc.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 | rpmvarValue |
| struct | rpmOption |
| struct | defaultEntry_s |
| struct | canonEntry_s |
| struct | tableType_s |
Defines | |
| #define | __power_pc() 0 |
| #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 |
Functions | |
| static int | doReadRC (FD_t fd, const char *urlfn) |
| static void | rpmSetVarArch (int var, const char *val, const char *arch) |
| static void | rebuildCompatTables (int type, const char *name) |
| static void | rpmRebuildTargetVars (const char **target, const char **canontarget) |
| static int | optionCompare (const void *a, const void *b) |
| static machCacheEntry | machCacheFindEntry (const machCache cache, const char *key) |
| static int | machCompatCacheAdd (char *name, const char *fn, int linenum, machCache cache) |
| static machEquivInfo | machEquivSearch (const machEquivTable table, const char *name) |
| static void | machAddEquiv (machEquivTable table, const char *name, int distance) |
| static void | machCacheEntryVisit (machCache cache, machEquivTable table, const char *name, int distance) |
| static void | machFindEquivs (machCache cache, machEquivTable table, const char *key) |
| static int | addCanon (canonEntry *table, int *tableLen, char *line, const char *fn, int lineNum) |
| static int | addDefault (defaultEntry *table, int *tableLen, char *line, const char *fn, int lineNum) |
| static const canonEntry | lookupInCanonTable (const char *name, const canonEntry table, int tableLen) |
| static const char * | lookupInDefaultTable (const char *name, const defaultEntry table, int tableLen) |
| static void | setVarDefault (int var, const char *macroname, const char *val, const char *body) |
| static void | setPathDefault (int var, const char *macroname, const char *subdir) |
| static void | setDefaults (void) |
| static void | defaultMachine (const char **arch, const char **os) |
| static const char * | rpmGetVarArch (int var, const char *arch) |
| const char * | rpmGetVar (int var) |
| Return value of an rpmrc variable. | |
| static void | freeRpmVar (struct rpmvarValue *orig) |
| void | rpmSetVar (int var, const char *val) |
| Set value of an rpmrc variable. | |
| void | rpmSetTables (int archTable, int osTable) |
| int | rpmMachineScore (int type, const char *name) |
| Return arch/os score of a name. | |
| void | rpmGetMachine (const char **arch, const char **os) |
| Return current arch/os names. | |
| void | rpmSetMachine (const char *arch, const char *os) |
| Set current arch/os names. | |
| static void | getMachineInfo (int type, const char **name, int *num) |
| void | rpmGetArchInfo (const char **name, int *num) |
| Return current arch name and/or number. | |
| void | rpmGetOsInfo (const char **name, int *num) |
| Return current os name and/or number. | |
| void | rpmFreeRpmrc (void) |
| Destroy rpmrc arch/os compatibility tables. | |
| static int | rpmReadRC (const char *rcfiles) |
| Read rpmrc (and macro) configuration file(s). | |
| int | rpmReadConfigFiles (const char *file, const char *target) |
| Read macro configuration file(s) for a target. | |
| int | rpmShowRC (FILE *fp) |
| Display current rpmrc (and macro) configuration. | |
Variables | |
| static const char * | defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc" |
| const char * | macrofiles = MACROFILES |
| List of macro files to read when configuring rpm. | |
| static struct tableType_s | tables [RPM_MACHTABLE_COUNT] |
| static struct rpmOption | optionTable [] |
| static int | optionTableSize = sizeof(optionTable) / sizeof(*optionTable) |
| static cptr_t | current [2] |
| static int | currTables [2] = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH } |
| static struct rpmvarValue | values [RPMVAR_NUM] |
| static int | defaultsInitialized = 0 |
| static const char * | prescriptenviron |
| #define _TOPDIRMACRO "%{_topdir}/" |
| typedef struct canonEntry_s * canonEntry |
| typedef struct defaultEntry_s * defaultEntry |
| typedef struct machCache_s * machCache |
| typedef struct machCacheEntry_s * machCacheEntry |
| typedef struct machEquivInfo_s * machEquivInfo |
| typedef struct machEquivTable_s * machEquivTable |
| typedef struct tableType_s * tableType |
| static int addCanon | ( | canonEntry * | table, | |
| int * | tableLen, | |||
| char * | line, | |||
| const char * | fn, | |||
| int | lineNum | |||
| ) | [static] |
| static int addDefault | ( | defaultEntry * | table, | |
| int * | tableLen, | |||
| char * | line, | |||
| const char * | fn, | |||
| int | lineNum | |||
| ) | [static] |
| static void defaultMachine | ( | const char ** | arch, | |
| const char ** | os | |||
| ) | [static] |
| static int doReadRC | ( | FD_t | fd, | |
| const char * | urlfn | |||
| ) | [static] |
| static void freeRpmVar | ( | struct rpmvarValue * | orig | ) | [static] |
| static void getMachineInfo | ( | int | type, | |
| const char ** | name, | |||
| int * | num | |||
| ) | [static] |
| static const canonEntry lookupInCanonTable | ( | const char * | name, | |
| const canonEntry | table, | |||
| int | tableLen | |||
| ) | [static] |
| static const char* lookupInDefaultTable | ( | const char * | name, | |
| const defaultEntry | table, | |||
| int | tableLen | |||
| ) | [static] |
| static void machAddEquiv | ( | machEquivTable | table, | |
| const char * | name, | |||
| int | distance | |||
| ) | [static] |
| static void machCacheEntryVisit | ( | machCache | cache, | |
| machEquivTable | table, | |||
| const char * | name, | |||
| int | distance | |||
| ) | [static] |
| static machCacheEntry machCacheFindEntry | ( | const machCache | cache, | |
| const char * | key | |||
| ) | [static] |
| static int machCompatCacheAdd | ( | char * | name, | |
| const char * | fn, | |||
| int | linenum, | |||
| machCache | cache | |||
| ) | [static] |
| static machEquivInfo machEquivSearch | ( | const machEquivTable | table, | |
| const char * | name | |||
| ) | [static] |
| static void machFindEquivs | ( | machCache | cache, | |
| machEquivTable | table, | |||
| const char * | key | |||
| ) | [static] |
| static int optionCompare | ( | const void * | a, | |
| const void * | b | |||
| ) | [static] |
| static void rebuildCompatTables | ( | int | type, | |
| const char * | name | |||
| ) | [static] |
| static const char* rpmGetVarArch | ( | int | var, | |
| const char * | arch | |||
| ) | [static] |
| void rpmRebuildTargetVars | ( | const char ** | target, | |
| const char ** | canontarget | |||
| ) | [static] |
| static void rpmSetVarArch | ( | int | var, | |
| const char * | val, | |||
| const char * | arch | |||
| ) | [static] |
| static void setPathDefault | ( | int | var, | |
| const char * | macroname, | |||
| const char * | subdir | |||
| ) | [static] |
| static void setVarDefault | ( | int | var, | |
| const char * | macroname, | |||
| const char * | val, | |||
| const char * | body | |||
| ) | [static] |
int currTables[2] = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH } [static] |
int defaultsInitialized = 0 [static] |
const char* defrcfiles = LIBRPMRC_FILENAME ":/etc/rpmrc:~/.rpmrc" [static] |
struct rpmOption optionTable[] [static] |
Initial value:
{
{ "include", RPMVAR_INCLUDE, 0, 1, 0, 2 },
{ "macrofiles", RPMVAR_MACROFILES, 0, 0, 0, 1 },
{ "optflags", RPMVAR_OPTFLAGS, 1, 0, 1, 0 },
{ "provides", RPMVAR_PROVIDES, 0, 0, 0, 0 },
}
int optionTableSize = sizeof(optionTable) / sizeof(*optionTable) [static] |
const char* prescriptenviron [static] |
Initial value:
"\n\ RPM_SOURCE_DIR=\"%{_sourcedir}\"\n\ RPM_BUILD_DIR=\"%{_builddir}\"\n\ RPM_OPT_FLAGS=\"%{optflags}\"\n\ RPM_ARCH=\"%{_arch}\"\n\ RPM_OS=\"%{_os}\"\n\ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\n\ RPM_DOC_DIR=\"%{_docdir}\"\n\ export RPM_DOC_DIR\n\ RPM_PACKAGE_NAME=\"%{name}\"\n\ RPM_PACKAGE_VERSION=\"%{version}\"\n\ RPM_PACKAGE_RELEASE=\"%{release}\"\n\ export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\n\ %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\n\ export RPM_BUILD_ROOT\n}\ "
struct tableType_s tables[RPM_MACHTABLE_COUNT] [static] |
struct rpmvarValue values[RPMVAR_NUM] [static] |
1.5.6