#include "rpmio.h"
#include "rpmmessages.h"
#include "rpmerr.h"
#include "header.h"
#include "popt.h"
Go to the source code of this file.
Data Structures | |
struct | rpmProblem_s |
struct | rpmProblemSet_s |
struct | rpmDependencyConflict_s |
Dependency problems found by rpmdepCheck(). More... | |
struct | rpmRelocation_s |
We pass these around as an array with a sentinel. More... | |
struct | rpmlead |
The lead data structure. More... | |
Defines | |
#define | RPMDBI_PACKAGES 0 |
Pseudo-tags used by the rpmdb iterator API. | |
#define | RPMDBI_DEPENDS 1 |
#define | RPMDBI_LABEL 2 |
#define | RPMDBI_ADDED 3 |
#define | RPMDBI_REMOVED 4 |
#define | RPMDBI_AVAILABLE 5 |
#define | RPMTAG_SERIAL RPMTAG_EPOCH |
#define | RPMTAG_COPYRIGHT RPMTAG_LICENSE |
#define | RPMTAG_PROVIDES RPMTAG_PROVIDENAME |
#define | RPMTAG_OBSOLETES RPMTAG_OBSOLETENAME |
#define | RPMTAG_EXTERNAL_TAG 1000000 |
#define | RPMFILE_MULTILIB_SHIFT 9 |
#define | RPMFILE_MULTILIB(N) ((N) << RPMFILE_MULTILIB_SHIFT) |
#define | RPMFILE_MULTILIB_MASK RPMFILE_MULTILIB(7) |
#define | RPMFILE_ALL ~(RPMFILE_NONE) |
#define | isFileMULTILIB(_fflags) ((_fflags) & RPMFILE_MULTILIB_MASK) |
#define | RPMSENSE_SENSEMASK 15 |
#define | RPMSENSE_TRIGGER (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) |
#define | isDependsMULTILIB(_dflags) ((_dflags) & RPMSENSE_MULTILIB) |
#define | _ALL_REQUIRES_MASK |
#define | _notpre(_x) ((_x) & ~RPMSENSE_PREREQ) |
#define | _INSTALL_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING) |
#define | _ERASE_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) |
#define | isLegacyPreReq(_x) (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) |
#define | isInstallPreReq(_x) ((_x) & _INSTALL_ONLY_MASK) |
#define | isErasePreReq(_x) ((_x) & _ERASE_ONLY_MASK) |
#define | RPMLEAD_BINARY 0 |
#define | RPMLEAD_SOURCE 1 |
#define | RPMLEAD_MAGIC0 0xed |
#define | RPMLEAD_MAGIC1 0xab |
#define | RPMLEAD_MAGIC2 0xee |
#define | RPMLEAD_MAGIC3 0xdb |
#define | RPMLEAD_SIZE 96 |
Typedefs | |
typedef enum rpmRC_e | rpmRC |
Package read return codes. | |
typedef enum rpmTag_e | rpmTag |
Tags identify data in package headers. | |
typedef enum rpmfileState_e | rpmfileState |
File States (when installed). | |
typedef enum rpmfileAttrs_e | rpmfileAttrs |
File Attributes. | |
typedef enum rpmsenseFlags_e | rpmsenseFlags |
Dependency Attributes. | |
Enumerations | |
enum | rpmRC_e { RPMRC_OK = 0, RPMRC_BADMAGIC = 1, RPMRC_FAIL = 2, RPMRC_BADSIZE = 3, RPMRC_SHORTREAD = 4 } |
Package read return codes. More... | |
enum | rpmTag_e { RPMTAG_HEADERIMAGE = 61, RPMTAG_HEADERSIGNATURES = 62, RPMTAG_HEADERIMMUTABLE = 63, RPMTAG_HEADERREGIONS = 64, RPMTAG_HEADERI18NTABLE = 100, RPMTAG_SIG_BASE = 256, RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, RPMTAG_SIGLEMD5_1 = RPMTAG_SIG_BASE+2, RPMTAG_SIGPGP = RPMTAG_SIG_BASE+3, RPMTAG_SIGLEMD5_2 = RPMTAG_SIG_BASE+4, RPMTAG_SIGMD5 = RPMTAG_SIG_BASE+5, RPMTAG_SIGGPG = RPMTAG_SIG_BASE+6, RPMTAG_SIGPGP5 = RPMTAG_SIG_BASE+7, RPMTAG_BADSHA1HEADER = RPMTAG_SIG_BASE+8, RPMTAG_SHA1HEADER = RPMTAG_SIG_BASE+9, RPMTAG_NAME = 1000, RPMTAG_VERSION = 1001, RPMTAG_RELEASE = 1002, RPMTAG_EPOCH = 1003 } |
Tags identify data in package headers. More... | |
enum | rpmfileState_e { RPMFILE_STATE_NORMAL = 0, RPMFILE_STATE_REPLACED = 1, RPMFILE_STATE_NOTINSTALLED = 2, RPMFILE_STATE_NETSHARED = 3 } |
File States (when installed). More... | |
enum | rpmfileAttrs_e { RPMFILE_NONE = 0, RPMFILE_CONFIG = (1 << 0), RPMFILE_DOC = (1 << 1), RPMFILE_DONOTUSE = (1 << 2), RPMFILE_MISSINGOK = (1 << 3), RPMFILE_NOREPLACE = (1 << 4), RPMFILE_SPECFILE = (1 << 5), RPMFILE_GHOST = (1 << 6), RPMFILE_LICENSE = (1 << 7), RPMFILE_README = (1 << 8), RPMFILE_EXCLUDE = (1 << 9) } |
File Attributes. More... | |
enum | rpmsenseFlags_e { RPMSENSE_ANY = 0, RPMSENSE_SERIAL = (1 << 0), RPMSENSE_LESS = (1 << 1), RPMSENSE_GREATER = (1 << 2), RPMSENSE_EQUAL = (1 << 3), RPMSENSE_PROVIDES = (1 << 4), RPMSENSE_CONFLICTS = (1 << 5), RPMSENSE_PREREQ = (1 << 6), RPMSENSE_OBSOLETES = (1 << 7), RPMSENSE_INTERP = (1 << 8), RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_POST = ((1 << 10)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_PREUN = ((1 << 11)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_POSTUN = ((1 << 12)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_VERIFY = (1 << 13), RPMSENSE_FIND_REQUIRES = (1 << 14), RPMSENSE_FIND_PROVIDES = (1 << 15), RPMSENSE_TRIGGERIN = (1 << 16), RPMSENSE_TRIGGERUN = (1 << 17), RPMSENSE_TRIGGERPOSTUN = (1 << 18), RPMSENSE_MULTILIB = (1 << 19), RPMSENSE_SCRIPT_PREP = (1 << 20), RPMSENSE_SCRIPT_BUILD = (1 << 21), RPMSENSE_SCRIPT_INSTALL = (1 << 22), RPMSENSE_SCRIPT_CLEAN = (1 << 23), RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), RPMSENSE_TRIGGERPREIN = (1 << 25), RPMSENSE_KEYRING = (1 << 26) } |
Dependency Attributes. More... | |
Functions | |
static void * | _free (const void *p) |
Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. | |
rpmRC | rpmReadPackageInfo (FD_t fd, Header *sigp, Header *hdrp) |
Return package signatures and header from file handle. | |
rpmRC | rpmReadPackageHeader (FD_t fd, Header *hdrp, int *isSource, int *major, int *minor) |
Return package header and lead info from file handle. | |
int | headerNVR (Header h, const char **np, const char **vp, const char **rp) |
Return name, version, release strings from header. | |
void | headerMergeLegacySigs (Header h, const Header sig) |
Translate and merge legacy signature tags into header. | |
Header | headerRegenSigHeader (const Header h) |
Regenerate signature header. | |
void | rpmBuildFileList (Header h, const char ***fileListPtr, int *fileCountPtr) |
Retrieve file names from header. | |
int | rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c) |
Retrieve tag info from header. | |
int | rpmPackageGetEntry (void *leadp, Header sigs, Header h, int_32 tag, int_32 *type, void **p, int_32 *c) |
Retrieve tag info from header. | |
const char *const | tagName (int tag) |
Return name of tag from value. | |
int | tagValue (const char *tagstr) |
Return value of tag from name. | |
void | freeFilesystems (void) |
Release storage used by file system usage cache. | |
int | rpmGetFilesystemList (const char ***listptr, int *num) |
Return (cached) file system mount points. | |
int | rpmGetFilesystemUsage (const char **fileList, int_32 *fssizes, int numFiles, uint_32 **usagesPtr, int flags) |
Determine per-file system usage for a list of files. | |
Variables | |
struct MacroContext_s * | rpmGlobalMacroContext |
struct MacroContext_s * | rpmCLIMacroContext |
const char * | RPMVERSION |
const char * | rpmNAME |
const char * | rpmEVR |
int | rpmFLAGS |
struct headerTagTableEntry_s | rpmTagTable [] |
Automatically generated table of tag name/value pairs. | |
const int | rpmTagTableSize |
Number of entries in rpmTagTable. | |
struct headerSprintfExtension_s | rpmHeaderFormats [] |
Table of query format extensions. | |
RPMRC | |
| |
#define | RPMVAR_OPTFLAGS 3 |
#define | RPMVAR_PROVIDES 38 |
#define | RPMVAR_INCLUDE 43 |
#define | RPMVAR_MACROFILES 49 |
#define | RPMVAR_NUM 55 |
#define | RPM_MACHTABLE_COUNT 4 |
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 * | macrofiles |
List of macro files to read when configuring rpm. | |
const char * | rpmGetVar (int var) |
Return value of an rpmrc variable. | |
void | rpmSetVar (int var, const char *val) |
Set value of an rpmrc variable. | |
int | rpmReadConfigFiles (const char *file, const char *target) |
Read macro configuration file(s) for a target. | |
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. | |
int | rpmMachineScore (int type, const char *name) |
Return arch/os score of a name. | |
int | rpmShowRC (FILE *fp) |
Display current rpmrc (and macro) configuration. | |
void | rpmSetTables (int archTable, int osTable) |
void | rpmSetMachine (const char *arch, const char *os) |
Set current arch/os names. | |
void | rpmGetMachine (const char **arch, const char **os) |
Return current arch/os names. | |
void | rpmFreeRpmrc (void) |
Destroy rpmrc arch/os compatibility tables. | |
RPMTS | |
| |
#define | XFA_SKIPPING(_a) ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPMULTILIB) |
#define | _noTransScripts |
#define | _noTransTriggers |
enum | fileAction_e { FA_UNKNOWN = 0, FA_CREATE, FA_COPYIN, FA_COPYOUT, FA_BACKUP, FA_SAVE, FA_SKIP, FA_ALTNAME, FA_ERASE, FA_SKIPNSTATE, FA_SKIPNETSHARED, FA_SKIPMULTILIB } |
File disposition(s) during package install/erase transaction. More... | |
enum | fileTypes_e { PIPE = 1, CDEV = 2, XDIR = 4, BDEV = 6, REG = 8, LINK = 10, SOCK = 12 } |
File types. More... | |
enum | rpmtransFlags_e { RPMTRANS_FLAG_NONE = 0, RPMTRANS_FLAG_TEST = (1 << 0), RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), RPMTRANS_FLAG_NOSCRIPTS = (1 << 2), RPMTRANS_FLAG_JUSTDB = (1 << 3), RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), RPMTRANS_FLAG_NODOCS = (1 << 5), RPMTRANS_FLAG_ALLFILES = (1 << 6), RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), RPMTRANS_FLAG_MULTILIB = (1 << 8), RPMTRANS_FLAG_DIRSTASH = (1 << 9), RPMTRANS_FLAG_REPACKAGE = (1 << 10), RPMTRANS_FLAG_PKGCOMMIT = (1 << 11), RPMTRANS_FLAG_PKGUNDO = (1 << 12), RPMTRANS_FLAG_COMMIT = (1 << 13), RPMTRANS_FLAG_UNDO = (1 << 14), RPMTRANS_FLAG_REVERSE = (1 << 15), RPMTRANS_FLAG_NOTRIGGERPREIN = (1 << 16), RPMTRANS_FLAG_NOPRE = (1 << 17), RPMTRANS_FLAG_NOPOST = (1 << 18), RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19), RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), RPMTRANS_FLAG_NOPREUN = (1 << 21), RPMTRANS_FLAG_NOPOSTUN = (1 << 22), RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), RPMTRANS_FLAG_APPLYONLY = (1 << 25), RPMTRANS_FLAG_CHAINSAW = (1 << 26), RPMTRANS_FLAG_NOMD5 = (1 << 27) } |
Bit(s) to control rpmRunTransactions() operation. More... | |
enum | rpmprobFilterFlags_e { RPMPROB_FILTER_NONE = 0, RPMPROB_FILTER_IGNOREOS = (1 << 0), RPMPROB_FILTER_IGNOREARCH = (1 << 1), RPMPROB_FILTER_REPLACEPKG = (1 << 2), RPMPROB_FILTER_FORCERELOCATE = (1 << 3), RPMPROB_FILTER_REPLACENEWFILES = (1 << 4), RPMPROB_FILTER_REPLACEOLDFILES = (1 << 5), RPMPROB_FILTER_OLDPACKAGE = (1 << 6), RPMPROB_FILTER_DISKSPACE = (1 << 7), RPMPROB_FILTER_DISKNODES = (1 << 8) } |
typedef void *(* | HFD_t )(const void *data, rpmTagType type) |
Prototype for headerFreeData() vector. | |
typedef int(* | HGE_t )(Header h, rpmTag tag, rpmTagType *type, void **p, int_32 *c) |
Prototype for headerGetEntry() vector. | |
typedef int(* | HAE_t )(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c) |
Prototype for headerAddEntry() vector. | |
typedef int(* | HME_t )(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c) |
Prototype for headerModifyEntry() vector. | |
typedef int(* | HRE_t )(Header h, int_32 tag) |
Prototype for headerRemoveEntry() vector. | |
typedef struct rpmRelocation_s | rpmRelocation |
We pass these around as an array with a sentinel. | |
typedef enum fileAction_e | fileAction |
File disposition(s) during package install/erase transaction. | |
typedef enum fileTypes_e | fileTypes |
File types. | |
typedef struct fsmIterator_s * | FSMI_t |
Iterator across package file info, forward on install, backward on erase. | |
typedef struct fsm_s * | FSM_t |
File state machine data. | |
typedef struct psm_s * | PSM_t |
Package state machine data. | |
typedef struct transactionFileInfo_s * | TFI_t |
typedef struct rpmTransactionSet_s * | rpmTransactionSet |
The RPM Transaction Set. | |
typedef enum rpmtransFlags_e | rpmtransFlags |
Bit(s) to control rpmRunTransactions() operation. | |
typedef enum rpmprobFilterFlags_e | rpmprobFilterFlags |
rpmRC | rpmInstallSourcePackage (const char *rootDir, FD_t fd, const char **specFilePtr, rpmCallbackFunction notify, rpmCallbackData notifyData, char **cookie) |
Install source package. | |
int | rpmVersionCompare (Header first, Header second) |
Compare headers to determine which header is "newer". | |
rpmTransactionSet | rpmtransCreateSet (rpmdb rpmdb, const char *rootDir) |
Create an empty transaction set. | |
int | rpmtransAddPackage (rpmTransactionSet ts, Header h, FD_t fd, const void *key, int upgrade, rpmRelocation *relocs) |
Add package to be installed to unordered transaction set. | |
void | rpmtransAvailablePackage (rpmTransactionSet ts, Header h, const void *key) |
Add package to universe of possible packages to install in transaction set. | |
int | rpmtransRemovePackage (rpmTransactionSet ts, int dboffset) |
Add package to be removed to unordered transaction set. | |
rpmTransactionSet | rpmtransFree (rpmTransactionSet ts) |
Destroy transaction set. | |
void | rpmtransSetScriptFd (rpmTransactionSet ts, FD_t fd) |
Save file handle to be used as stderr when running package scripts. | |
int | rpmtransGetKeys (const rpmTransactionSet ts, const void ***ep, int *nep) |
Retrieve keys from ordered transaction set. | |
int | rpmdepCheck (rpmTransactionSet ts, rpmDependencyConflict *conflicts, int *numConflicts) |
Check that all dependencies can be resolved. | |
int | rpmdepOrder (rpmTransactionSet ts) |
Determine package order in a transaction set according to dependencies. | |
rpmDependencyConflict | rpmdepFreeConflicts (rpmDependencyConflict conflicts, int numConflicts) |
Destroy dependency conflicts storage. | |
int | rpmGetRpmlibProvides (const char ***provNames, int **provFlags, const char ***provVersions) |
Return copy of rpmlib internal provides. | |
int | rpmvercmp (const char *a, const char *b) |
Segmented string compare for version and/or release. | |
int | rpmRangesOverlap (const char *AName, const char *AEVR, int AFlags, const char *BName, const char *BEVR, int BFlags) |
Compare two versioned dependency ranges, looking for overlap. | |
int | rpmCheckRpmlibProvides (const char *keyName, const char *keyEVR, int keyFlags) |
Check dependency against internal rpmlib feature provides. | |
void | rpmShowRpmlibProvides (FILE *fp) |
Display current rpmlib feature provides. | |
int | rpmRunTransactions (rpmTransactionSet ts, rpmCallbackFunction notify, rpmCallbackData notifyData, rpmProblemSet okProbs, rpmProblemSet *newProbs, rpmtransFlags transFlags, rpmprobFilterFlags ignoreSet) |
Process all packages in transaction set. | |
RPMQV | |
| |
#define | RPMVERIFY_ALL ~(RPMVERIFY_NONE) |
enum | rpmQVSources_e { RPMQV_PACKAGE = 0, RPMQV_PATH, RPMQV_ALL, RPMQV_RPM, RPMQV_GROUP, RPMQV_WHATPROVIDES, RPMQV_WHATREQUIRES, RPMQV_TRIGGEREDBY, RPMQV_DBOFFSET, RPMQV_SPECFILE, RPMQV_PKGID, RPMQV_HDRID, RPMQV_FILEID, RPMQV_TID } |
The command line argument will be used to retrieve header(s) . More... | |
enum | rpmVerifyAttrs_e { RPMVERIFY_NONE = 0, RPMVERIFY_MD5 = (1 << 0), RPMVERIFY_FILESIZE = (1 << 1), RPMVERIFY_LINKTO = (1 << 2), RPMVERIFY_USER = (1 << 3), RPMVERIFY_GROUP = (1 << 4), RPMVERIFY_MTIME = (1 << 5), RPMVERIFY_MODE = (1 << 6), RPMVERIFY_RDEV = (1 << 7), RPMVERIFY_READLINKFAIL = (1 << 28), RPMVERIFY_READFAIL = (1 << 29), RPMVERIFY_LSTATFAIL = (1 << 30) } |
Bit(s) for rpmVerifyFile() attributes and result. More... | |
typedef struct rpmQVArguments_s * | QVA_t |
typedef enum rpmQVSources_e | rpmQVSources |
The command line argument will be used to retrieve header(s) . | |
typedef enum rpmVerifyAttrs_e | rpmVerifyAttrs |
Bit(s) for rpmVerifyFile() attributes and result. | |
int | rpmVerifyFile (const char *root, Header h, int filenum, rpmVerifyAttrs *result, rpmVerifyAttrs omitMask) |
Verify file attributes (including MD5 sum). | |
int | rpmVerifyScript (const char *rootDir, Header h, FD_t scriptFd) |
Return exit code from running verify script from header. | |
RPMDB | |
| |
enum | rpmMireMode_e { RPMMIRE_DEFAULT = 0, RPMMIRE_STRCMP = 1, RPMMIRE_REGEX = 2, RPMMIRE_GLOB = 3 } |
Tag value pattern match mode. More... | |
typedef struct rpmdb_s * | rpmdb |
typedef struct _dbiIndexSet * | dbiIndexSet |
typedef struct _rpmdbMatchIterator * | rpmdbMatchIterator |
typedef enum rpmMireMode_e | rpmMireMode |
Tag value pattern match mode. | |
int * | dbiTags |
Tags for which rpmdb indices will be built. | |
int | dbiTagsMax |
int | rpmdbOpen (const char *prefix, rpmdb *dbp, int mode, int perms) |
Open rpm database. | |
int | rpmdbInit (const char *prefix, int perms) |
Initialize database. | |
int | rpmdbVerify (const char *prefix) |
Verify database components. | |
int | rpmdbClose (rpmdb db) |
Close all database indices and free rpmdb. | |
int | rpmdbSync (rpmdb db) |
Sync all database indices. | |
int | rpmdbOpenAll (rpmdb db) |
Open all database indices. | |
int | rpmdbCountPackages (rpmdb db, const char *name) |
Return number of instances of package in rpm database. | |
rpmdbMatchIterator | rpmdbFreeIterator (rpmdbMatchIterator mi) |
Destroy rpm database iterator. | |
rpmdb | rpmdbGetIteratorRpmDB (rpmdbMatchIterator mi) |
Return rpm database used by iterator. | |
unsigned int | rpmdbGetIteratorOffset (rpmdbMatchIterator mi) |
Return join key for current position of rpm database iterator. | |
int | rpmdbGetIteratorCount (rpmdbMatchIterator mi) |
Return number of elements in rpm database iterator. | |
int | rpmdbAppendIterator (rpmdbMatchIterator mi, const int *hdrNums, int nHdrNums) |
Append items to set of package instances to iterate. | |
int | rpmdbPruneIterator (rpmdbMatchIterator mi, int *hdrNums, int nHdrNums, int sorted) |
Remove items from set of package instances to iterate. | |
int | rpmdbSetIteratorRE (rpmdbMatchIterator mi, rpmTag tag, rpmMireMode mode, const char *pattern) |
Add pattern to iterator selector. | |
int | rpmdbSetIteratorVersion (rpmdbMatchIterator mi, const char *version) |
Modify iterator to filter out headers that do not match version. | |
int | rpmdbSetIteratorRelease (rpmdbMatchIterator mi, const char *release) |
Modify iterator to filter out headers that do not match release. | |
int | rpmdbSetIteratorRewrite (rpmdbMatchIterator mi, int rewrite) |
Prepare iterator for lazy writes. | |
int | rpmdbSetIteratorModified (rpmdbMatchIterator mi, int modified) |
Modify iterator to mark header for lazy write. | |
Header | rpmdbNextIterator (rpmdbMatchIterator mi) |
Return next package header from iteration. | |
Header | XrpmdbNextIterator (rpmdbMatchIterator mi, const char *f, unsigned int l) |
rpmdbMatchIterator | rpmdbInitIterator (rpmdb db, int rpmtag, const void *keyp, size_t keylen) |
Return database iterator. | |
int | rpmdbAdd (rpmdb db, int iid, Header h) |
Add package header to rpm database and indices. | |
int | rpmdbRemove (rpmdb db, int rid, unsigned int hdrNum) |
Remove package header from rpm database and indices. | |
int | rpmdbRebuild (const char *prefix) |
Rebuild database indices from package headers. | |
RPMPROBS | |
| |
enum | rpmProblemType_e { RPMPROB_BADARCH, RPMPROB_BADOS, RPMPROB_PKG_INSTALLED, RPMPROB_BADRELOCATE, RPMPROB_REQUIRES, RPMPROB_CONFLICT, RPMPROB_NEW_FILE_CONFLICT, RPMPROB_FILE_CONFLICT, RPMPROB_OLDPACKAGE, RPMPROB_DISKSPACE, RPMPROB_DISKNODES, RPMPROB_BADPRETRANS } |
Enumerate transaction set problem types. More... | |
typedef enum rpmProblemType_e | rpmProblemType |
Enumerate transaction set problem types. | |
typedef struct rpmProblem_s * | rpmProblem |
typedef struct rpmProblemSet_s * | rpmProblemSet |
typedef struct rpmDependencyConflict_s * | rpmDependencyConflict |
Dependency problems found by rpmdepCheck(). | |
void | printDepFlags (FILE *fp, const char *version, int flags) |
void | printDepProblems (FILE *fp, const rpmDependencyConflict conflicts, int numConflicts) |
Print results of rpmdepCheck() dependency check. | |
const char * | rpmProblemString (const rpmProblem prob) |
Return formatted string representation of problem. | |
void | rpmProblemPrint (FILE *fp, rpmProblem prob) |
Output formatted string representation of problem to file handle. | |
void | rpmProblemSetPrint (FILE *fp, rpmProblemSet probs) |
Print problems to file handle. | |
void | rpmProblemSetFree (rpmProblemSet probs) |
Destroy problem set. | |
RPMEIU | |
| |
enum | rpmInstallInterfaceFlags_e { INSTALL_NONE = 0, INSTALL_PERCENT = (1 << 0), INSTALL_HASH = (1 << 1), INSTALL_NODEPS = (1 << 2), INSTALL_NOORDER = (1 << 3), INSTALL_LABEL = (1 << 4), INSTALL_UPGRADE = (1 << 5), INSTALL_FRESHEN = (1 << 6), INSTALL_INSTALL = (1 << 7), INSTALL_ERASE = (1 << 8) } |
Bit(s) to control rpmInstall() operation. More... | |
enum | rpmEraseInterfaceFlags_e { UNINSTALL_NONE = 0, UNINSTALL_NODEPS = (1 << 0), UNINSTALL_ALLMATCHES = (1 << 1) } |
Bit(s) to control rpmErase() operation. More... | |
typedef enum rpmInstallInterfaceFlags_e | rpmInstallInterfaceFlags |
Bit(s) to control rpmInstall() operation. | |
typedef enum rpmEraseInterfaceFlags_e | rpmEraseInterfaceFlags |
Bit(s) to control rpmErase() operation. | |
RPMK | |
| |
enum | rpmtagSignature { RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003, RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006 } |
Tags found in signature header from package. More... | |
enum | rpmVerifySignatureReturn_e { RPMSIG_OK = 0, RPMSIG_UNKNOWN = 1, RPMSIG_BAD = 2, RPMSIG_NOKEY = 3, RPMSIG_NOTTRUSTED = 4 } |
Return codes from verifySignature(). More... | |
typedef enum rpmVerifySignatureReturn_e | rpmVerifySignatureReturn |
Return codes from verifySignature(). | |
rpmVerifySignatureReturn | rpmVerifySignature (const char *file, int_32 sigTag, const void *sig, int count, char *result) |
Verify a signature from a package. | |
Header | rpmFreeSignature (Header h) |
Destroy signature header from package. |
Definition in file rpmlib.h.
#define _ALL_REQUIRES_MASK |
(\ RPMSENSE_INTERP | \ RPMSENSE_SCRIPT_PRE | \ RPMSENSE_SCRIPT_POST | \ RPMSENSE_SCRIPT_PREUN | \ RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ RPMSENSE_SCRIPT_PREP | \ RPMSENSE_SCRIPT_BUILD | \ RPMSENSE_SCRIPT_INSTALL | \ RPMSENSE_SCRIPT_CLEAN | \ RPMSENSE_RPMLIB | \ RPMSENSE_KEYRING )
#define _ERASE_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN) |
#define _INSTALL_ONLY_MASK _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING) |
#define _noTransScripts |
( RPMTRANS_FLAG_NOPRE | \ RPMTRANS_FLAG_NOPOST | \ RPMTRANS_FLAG_NOPREUN | \ RPMTRANS_FLAG_NOPOSTUN \ )
#define _noTransTriggers |
#define isDependsMULTILIB | ( | _dflags | ) | ((_dflags) & RPMSENSE_MULTILIB) |
#define isFileMULTILIB | ( | _fflags | ) | ((_fflags) & RPMFILE_MULTILIB_MASK) |
#define isLegacyPreReq | ( | _x | ) | (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ) |
#define RPMDBI_PACKAGES 0 |
#define RPMFILE_MULTILIB | ( | N | ) | ((N) << RPMFILE_MULTILIB_SHIFT) |
#define RPMSENSE_TRIGGER (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) |
#define XFA_SKIPPING | ( | _a | ) | ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPMULTILIB) |
typedef enum fileAction_e fileAction |
File disposition(s) during package install/erase transaction.
typedef enum fileTypes_e fileTypes |
File types.
These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.
typedef int(* HAE_t)(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c) |
Prototype for headerAddEntry() vector.
Duplicate tags are okay, but only defined for iteration (with the exceptions noted below). While you are allowed to add i18n string arrays through this function, you probably don't mean to. See headerAddI18NString() instead.
h | header | |
tag | tag | |
type | tag value data type | |
p | pointer to tag value(s) | |
c | number of values |
typedef void*(* HFD_t)(const void *data, rpmTagType type) |
Prototype for headerFreeData() vector.
data | address of data (or NULL) | |
type | type of data (or -1 to force free) |
typedef int(* HGE_t)(Header h, rpmTag tag,rpmTagType *type,void **p,int_32 *c) |
Prototype for headerGetEntry() vector.
Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE entry is present).
h | header | |
tag | tag |
type | address of tag value data type (or NULL) | |
p | address of pointer to tag value(s) (or NULL) | |
c | address of number of values (or NULL) |
typedef int(* HME_t)(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c) |
Prototype for headerModifyEntry() vector.
If there are multiple entries with this tag, the first one gets replaced.
h | header | |
tag | tag | |
type | tag value data type | |
p | pointer to tag value(s) | |
c | number of values |
Prototype for headerRemoveEntry() vector.
Delete tag in header. Removes all entries of type tag from the header, returns 1 if none were found.
h | header | |
tag | tag |
typedef struct rpmDependencyConflict_s * rpmDependencyConflict |
Dependency problems found by rpmdepCheck().
typedef enum rpmfileAttrs_e rpmfileAttrs |
File Attributes.
typedef enum rpmfileState_e rpmfileState |
File States (when installed).
typedef enum rpmMireMode_e rpmMireMode |
Tag value pattern match mode.
typedef enum rpmprobFilterFlags_e rpmprobFilterFlags |
typedef struct rpmProblem_s * rpmProblem |
typedef struct rpmProblemSet_s * rpmProblemSet |
typedef enum rpmProblemType_e rpmProblemType |
Enumerate transaction set problem types.
typedef struct rpmRelocation_s rpmRelocation |
We pass these around as an array with a sentinel.
typedef enum rpmsenseFlags_e rpmsenseFlags |
Dependency Attributes.
Tags identify data in package headers.
enum fileAction_e |
File disposition(s) during package install/erase transaction.
FA_UNKNOWN |
initial action for file ... |
FA_CREATE |
... copy in from payload. |
FA_COPYIN |
... copy in from payload. |
FA_COPYOUT |
... copy out to payload. |
FA_BACKUP |
... renamed with ".rpmorig" extension. |
FA_SAVE |
... renamed with ".rpmsave" extension. |
FA_SKIP |
... already replaced, don't remove. |
FA_ALTNAME |
... create with ".rpmnew" extension. |
FA_ERASE |
... to be removed. |
FA_SKIPNSTATE |
... untouched, state "not installed". |
FA_SKIPNETSHARED |
... untouched, state "netshared". |
FA_SKIPMULTILIB |
... untouched.
|
enum fileTypes_e |
File types.
These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.
enum rpmfileAttrs_e |
File Attributes.
RPMFILE_NONE | |
RPMFILE_CONFIG |
from %config |
RPMFILE_DOC |
from %doc |
RPMFILE_DONOTUSE |
|
RPMFILE_MISSINGOK |
from %config(missingok) |
RPMFILE_NOREPLACE |
from %config(noreplace) |
RPMFILE_SPECFILE |
|
RPMFILE_GHOST |
from %ghost |
RPMFILE_LICENSE |
from %license |
RPMFILE_README |
from %readme |
RPMFILE_EXCLUDE |
from %exclude |
enum rpmfileState_e |
enum rpmMireMode_e |
enum rpmprobFilterFlags_e |
enum rpmProblemType_e |
Enumerate transaction set problem types.
enum rpmRC_e |
enum rpmsenseFlags_e |
Dependency Attributes.
RPMSENSE_ANY | |
RPMSENSE_SERIAL |
|
RPMSENSE_LESS | |
RPMSENSE_GREATER | |
RPMSENSE_EQUAL | |
RPMSENSE_PROVIDES | |
RPMSENSE_CONFLICTS | |
RPMSENSE_PREREQ |
|
RPMSENSE_OBSOLETES | |
RPMSENSE_INTERP |
Interpreter used by scriptlet. |
RPMSENSE_SCRIPT_PRE |
pre dependency. |
RPMSENSE_SCRIPT_POST |
post dependency. |
RPMSENSE_SCRIPT_PREUN |
preun dependency. |
RPMSENSE_SCRIPT_POSTUN |
postun dependency. |
RPMSENSE_SCRIPT_VERIFY |
verify dependency. |
RPMSENSE_FIND_REQUIRES |
find-requires generated dependency. |
RPMSENSE_FIND_PROVIDES |
find-provides generated dependency. |
RPMSENSE_TRIGGERIN |
triggerin dependency. |
RPMSENSE_TRIGGERUN |
triggerun dependency. |
RPMSENSE_TRIGGERPOSTUN |
triggerpostun dependency. |
RPMSENSE_MULTILIB | |
RPMSENSE_SCRIPT_PREP |
prep build dependency. |
RPMSENSE_SCRIPT_BUILD |
build build dependency. |
RPMSENSE_SCRIPT_INSTALL |
install build dependency. |
RPMSENSE_SCRIPT_CLEAN |
clean build dependency. |
RPMSENSE_RPMLIB |
rpmlib(feature) dependency. |
RPMSENSE_TRIGGERPREIN |
|
RPMSENSE_KEYRING |
enum rpmTag_e |
Tags identify data in package headers.
static void* _free | ( | const void * | p | ) | [inline, static] |
void freeFilesystems | ( | void | ) |
void printDepFlags | ( | FILE * | fp, | |
const char * | version, | |||
int | flags | |||
) |
Definition at line 19 of file problems.c.
void printDepProblems | ( | FILE * | fp, | |
const rpmDependencyConflict | conflicts, | |||
int | numConflicts | |||
) |
Print results of rpmdepCheck() dependency check.
fp | output file | |
conflicts | dependency problems | |
numConflicts | no. of dependency problems |
Definition at line 61 of file problems.c.
void rpmBuildFileList | ( | Header | h, | |
const char *** | fileListPtr, | |||
int * | fileCountPtr | |||
) |
Retrieve file names from header.
The representation of file names in package headers changed in rpm-4.0. Originally, file names were stored as an array of paths. In rpm-4.0, file names are stored as separate arrays of dirname's and basename's, with a dirname index to associate the correct dirname with each basname. This function is used to retrieve file names independent of how the file names are represented in the package header.
h | header |
fileListPtr | address of array of file names | |
fileCountPtr | address of number of files |
int rpmGetFilesystemList | ( | const char *** | listptr, | |
int * | num | |||
) |
int rpmGetFilesystemUsage | ( | const char ** | fileList, | |
int_32 * | fssizes, | |||
int | numFiles, | |||
uint_32 ** | usagesPtr, | |||
int | flags | |||
) |
Determine per-file system usage for a list of files.
fileList | array of absolute file names | |
fssizes | array of file sizes | |
numFiles | number of files in list |
usagesPtr | address of per-file system usage array (or NULL) |
flags | (unused) |
Retrieve tag info from header.
This is a "dressed" entry to headerGetEntry to do: 1) DIRNAME/BASENAME/DIRINDICES -> FILENAMES tag conversions. 2) i18n lookaside (if enabled).
h | header | |
tag | tag |
type | address of tag value data type | |
p | address of pointer to tag value(s) | |
c | address of number of values |
rpmRC rpmInstallSourcePackage | ( | const char * | rootDir, | |
FD_t | fd, | |||
const char ** | specFilePtr, | |||
rpmCallbackFunction | notify, | |||
rpmCallbackData | notifyData, | |||
char ** | cookie | |||
) |
Install source package.
rootDir | path to top of install tree (or NULL) | |
fd | file handle |
specFilePtr | address of spec file name (or NULL) |
notify | progress callback | |
notifyData | progress callback private data |
cooke | address of cookie pointer (or NULL) |
int rpmPackageGetEntry | ( | void * | leadp, | |
Header | sigs, | |||
Header | h, | |||
int_32 | tag, | |||
int_32 * | type, | |||
void ** | p, | |||
int_32 * | c | |||
) |
Retrieve tag info from header.
Yet Another "dressed" entry to headerGetEntry in order to unify signature/header tag retrieval.
leadp | rpm lead | |
h | header | |
sigs | signatures | |
tag | tag |
type | address of tag value data type | |
p | address of pointer to tag value(s) | |
c | address of number of values |
void rpmProblemPrint | ( | FILE * | fp, | |
rpmProblem | prob | |||
) |
Output formatted string representation of problem to file handle.
fp | file handle | |
prob | rpm problem |
Definition at line 202 of file problems.c.
void rpmProblemSetFree | ( | rpmProblemSet | probs | ) |
void rpmProblemSetPrint | ( | FILE * | fp, | |
rpmProblemSet | probs | |||
) |
Print problems to file handle.
fp | file handle | |
probs | problem set |
Definition at line 209 of file problems.c.
const char* rpmProblemString | ( | const rpmProblem | prob | ) |
Return formatted string representation of problem.
prob | rpm problem |
Definition at line 114 of file problems.c.
Return package header and lead info from file handle.
fd | file handle |
hdrp | address of header (or NULL) | |
isSource | address to return lead source flag (or NULL) | |
major | address to return lead major (or NULL) | |
minor | address to return lead minor (or NULL) |
Return package signatures and header from file handle.
fd | file handle |
sigp | address of signature header (or NULL) | |
hdrp | address of header (or NULL) |
Return exit code from running verify script from header.
rootDir | path to top of install tree | |
h | header | |
scriptFd | file handle to use for stderr (or NULL) |
Return exit code from running verify script from header.
rootDir | path to top of install tree | |
h | header | |
scriptFd | file handle to use for stderr (or NULL) |
const char* const tagName | ( | int | tag | ) |
int tagValue | ( | const char * | tagstr | ) |
Header XrpmdbNextIterator | ( | rpmdbMatchIterator | mi, | |
const char * | f, | |||
unsigned int | l | |||
) |
int dbiTagsMax |
struct MacroContext_s* rpmCLIMacroContext |
struct MacroContext_s* rpmGlobalMacroContext |
struct headerSprintfExtension_s rpmHeaderFormats[] |
struct headerTagTableEntry_s rpmTagTable[] |
Automatically generated table of tag name/value pairs.
Definition at line 4 of file tagtable.c.
const int rpmTagTableSize |
Number of entries in rpmTagTable.
Definition at line 115 of file tagtable.c.
const char* RPMVERSION |