Files | |
file | rpmlib.h |
In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not. | |
file | dbconfig.c |
file | hdrNVR.c |
file | rpmdb.c |
file | rpmdb.h |
Access RPM indices using Berkeley DB interface(s). | |
Data Structures | |
struct | rpmdb_s |
Describes the collection of index databases used by rpm. More... | |
Typedefs | |
typedef rpmdb_s * | rpmdb |
Database of headers and tag value indices. | |
typedef _rpmdbMatchIterator * | rpmdbMatchIterator |
Database iterator. | |
typedef _dbiIndexSet * | dbiIndexSet |
A single element (i.e. | |
Enumerations | |
enum | rpmdbFlags { RPMDB_FLAG_JUSTCHECK = (1 << 0), RPMDB_FLAG_MINIMAL = (1 << 1), RPMDB_FLAG_CHROOT = (1 << 2) } |
Functions | |
int | rpmdbFindFpList (rpmdb db, fingerPrint *fpList, dbiIndexSet *matchList, int numItems) |
Find fingerprint matches in database. | |
unsigned int | rpmdbGetIteratorFileNum (rpmdbMatchIterator mi) |
rpmdb | rpmdbUnlink (rpmdb db, const char *msg) |
Unreference a database instance. | |
rpmdb | rpmdbLink (rpmdb db, const char *msg) |
Reference a database instance. | |
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. | |
unsigned int | rpmdbGetIteratorOffset (rpmdbMatchIterator mi) |
Return header 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 | rpmdbSetIteratorRewrite (rpmdbMatchIterator mi, int rewrite) |
Prepare iterator for lazy writes. | |
int | rpmdbSetIteratorModified (rpmdbMatchIterator mi, int modified) |
Modify iterator to mark header for lazy write on release. | |
int | rpmdbSetHdrChk (rpmdbMatchIterator mi, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, const char **msg)) |
Modify iterator to verify retrieved header blobs. | |
rpmdbMatchIterator | rpmdbInitIterator (rpmdb db, rpmTag rpmtag, const void *keyp, size_t keylen) |
Return database iterator. | |
Header | rpmdbNextIterator (rpmdbMatchIterator mi) |
Return next package header from iteration. | |
int | rpmdbCheckSignals (void) |
Check for and exit on termination signals. | |
int | rpmdbCheckTerminate (int terminate) |
Check rpmdb signal handler for trapped signal and/or requested exit, clean up any open iterators and databases on termination condition. | |
rpmdbMatchIterator | rpmdbFreeIterator (rpmdbMatchIterator mi) |
Destroy rpm database iterator. | |
int | rpmdbAdd (rpmdb db, int iid, Header h, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, const char **msg)) |
Add package header to rpm database and indices. | |
int | rpmdbRemove (rpmdb db, int rid, unsigned int hdrNum, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, const char **msg)) |
Remove package header from rpm database and indices. | |
int | rpmdbRebuild (const char *prefix, rpmts ts, rpmRC(*hdrchk)(rpmts ts, const void *uh, size_t uc, const char **msg)) |
Rebuild database indices from package headers. | |
Variables | |
int * | dbiTags |
Tags for which rpmdb indices will be built. |
typedef struct _dbiIndexSet* dbiIndexSet |
typedef struct _rpmdbMatchIterator* rpmdbMatchIterator |
enum rpmdbFlags |
int rpmdbAdd | ( | rpmdb | db, | |
int | iid, | |||
Header | h, | |||
rpmts | ts, | |||
rpmRC(*)(rpmts ts, const void *uh, size_t uc, const char **msg) | hdrchk | |||
) |
Add package header to rpm database and indices.
db | rpm database | |
iid | install transaction id (iid = 0 or -1 to skip) | |
h | header | |
ts | (unused) transaction set (or NULL) | |
(*hdrchk) | (unused) headerCheck() vector (or NULL) |
Definition at line 2939 of file rpmdb.c.
References _, _DBSWAP, _free(), _noDirTokens, alloca(), blockSignals(), _dbiIndex::dbi_no_dbsync, _dbiIndex::dbi_permit_dups, _dbiIndex::dbi_rpmtag, _dbiIndex::dbi_txnid, dbiAppendSet(), dbiByteSwapped(), dbiCclose(), dbiCopen(), dbiFreeIndexSet(), dbiGet(), dbiIndexNewItem(), dbiOpen(), dbiPut(), dbiSync(), dbiTags, dbiTagsMax, dbt2set(), expandFilelist(), HEADER_MAGIC_NO, headerAddEntry(), headerFreeData(), headerGetEntryMinMemory(), headerIsEntry(), headerRemoveEntry(), headerSizeof(), headerUnload(), isInstallPreReq, isTemporaryDB(), myinstall_instance, nibble(), pgpNewDig(), pgpPrtPkts(), RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPMDBI_PACKAGES, RPMERR_DBCORRUPT, RPMERR_DBGETINDEX, RPMERR_DBPUTINDEX, rpmError, RPMMESS_DEBUG, RPMMESS_ERROR, rpmMessage, RPMRC_FAIL, RPMRC_NOTFOUND, RPMTAG_BASENAMES, RPMTAG_FILEMD5S, RPMTAG_GROUP, RPMTAG_INSTALLTID, RPMTAG_PUBKEYS, RPMTAG_REMOVETID, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_TRIGGERNAME, set2dbt(), tagName(), _dbiIndexItem::tagNum, _dbswap::ui, and xcalloc().
Referenced by ftsCacheUpdate(), rpmcliImportPubkey(), rpmdbRebuild(), and rpmpsmStage().
int rpmdbAppendIterator | ( | rpmdbMatchIterator | mi, | |
const int * | hdrNums, | |||
int | nHdrNums | |||
) |
Append items to set of package instances to iterate.
mi | rpm database iterator | |
hdrNums | array of package instances | |
nHdrNums | number of elements in array |
Definition at line 2479 of file rpmdb.c.
References dbiAppendSet(), _rpmdbMatchIterator::mi_set, and xcalloc().
Referenced by markReplacedFiles().
int rpmdbCheckSignals | ( | void | ) |
Check for and exit on termination signals.
Definition at line 747 of file rpmdb.c.
References EXIT_FAILURE, rpmdbCheckTerminate(), RPMMESS_DEBUG, rpmMessage, and rpmsqCaught.
Referenced by checkSignals(), rpmdbInitIterator(), rpmQueryVerify(), rpmtsRun(), and unblockSignals().
int rpmdbCheckTerminate | ( | int | terminate | ) |
Check rpmdb signal handler for trapped signal and/or requested exit, clean up any open iterators and databases on termination condition.
On non-zero exit any open references to rpmdb are invalid and cannot be accessed anymore, calling process should terminate immediately.
terminate | 0 to only check for signals, 1 to terminate anyway |
Definition at line 703 of file rpmdb.c.
References rpmdb_s::db_next, _rpmdbMatchIterator::mi_next, rpmdbClose(), rpmdbFreeIterator(), rpmdbRock, rpmmiRock, and rpmsqCaught.
Referenced by rpm_exithook(), and rpmdbCheckSignals().
int rpmdbClose | ( | rpmdb | db | ) |
Close all database indices and free rpmdb.
db | rpm database |
Definition at line 869 of file rpmdb.c.
References rpmdb_s::_dbi, _free(), rpmdb_s::db_bits, rpmdb_s::db_errpfx, rpmdb_s::db_home, rpmdb_s::db_ndbi, rpmdb_s::db_root, dbiClose(), next, rpmdb_s::nrefs, PBM_FREE, rpmdbRock, rpmdbUnlink, and rpmsqEnable().
Referenced by main(), openDatabase(), rpmdb_dealloc(), rpmdbCheckTerminate(), rpmdbInit(), rpmdbRebuild(), rpmdbVerify(), rpmtsCloseDB(), and rpmtsCloseSDB().
int rpmdbCountPackages | ( | rpmdb | db, | |
const char * | name | |||
) |
Return number of instances of package in rpm database.
Definition at line 1354 of file rpmdb.c.
References _, alloca(), _dbiIndex::dbi_rpmtag, _dbiIndex::dbi_txnid, dbiCclose(), dbiCopen(), dbiFreeIndexSet(), dbiGet(), dbiIndexSetCount(), dbiOpen(), dbt2set(), RPMERR_DBGETINDEX, rpmError, RPMTAG_NAME, and tagName().
Referenced by handleOneTrigger(), rpmpsmStage(), and runTriggers().
int rpmdbFindFpList | ( | rpmdb | db, | |
fingerPrint * | fpList, | |||
dbiIndexSet * | matchList, | |||
int | numItems | |||
) |
Find fingerprint matches in database.
db | rpm database | |
fpList | fingerprint array |
matchList | returned fingerprint matches |
numItems | number of fingerprint items |
Definition at line 3412 of file rpmdb.c.
References _free(), _dbiIndexSet::count, dbiAppendSet(), FP_EQUAL, fpCacheCreate(), fpCacheFree(), fpLookupList(), _dbiIndexItem::fpNum, _dbiIndexItem::hdrNum, headerFreeData(), headerGetEntryMinMemory(), _rpmdbMatchIterator::mi_data, _rpmdbMatchIterator::mi_key, _rpmdbMatchIterator::mi_set, _rpmdbMatchIterator::mi_setx, _dbiIndexSet::recs, rpmdbFreeIterator(), rpmdbGetIteratorCount(), rpmdbGrowIterator(), rpmdbInitIterator(), rpmdbNextIterator(), rpmdbSortIterator(), RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, skipDir(), _dbiIndexItem::tagNum, and xcalloc().
Referenced by rpmtsRun().
rpmdbMatchIterator rpmdbFreeIterator | ( | rpmdbMatchIterator | mi | ) |
Destroy rpm database iterator.
mi | rpm database iterator |
Definition at line 1677 of file rpmdb.c.
References _free(), dbiCclose(), dbiOpen(), _rpmdbMatchIterator::mi_db, _rpmdbMatchIterator::mi_dbc, _rpmdbMatchIterator::mi_nre, _rpmdbMatchIterator::mi_re, miFreeHeader(), next, miRE_s::pattern, RPMDBI_PACKAGES, and rpmmiRock.
Referenced by _rpmtsAddRollbackElement(), checkPackageSet(), dbiFindMatches(), ftsCacheUpdate(), handleInstInstalledFiles(), handleRmvdInstalledFiles(), IDTXload(), main(), markReplacedFiles(), rpmcliShowMatches(), rpmdb_length(), rpmdb_subscript(), rpmdbCheckTerminate(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRebuild(), rpmdbRemove(), rpmErase(), rpmgiFree(), rpmgiInitFilter(), rpmgiNext(), rpmInstall(), rpmmi_dealloc(), rpmmi_iternext(), rpmpsmStage(), rpmQueryVerify(), rpmts_AddErase(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsFindPubkey(), rpmtsRun(), rpmtsSolve(), runImmedTriggers(), runTriggers(), and unsatisfiedDepend().
int rpmdbGetIteratorCount | ( | rpmdbMatchIterator | mi | ) |
Return number of elements in rpm database iterator.
mi | rpm database iterator |
Definition at line 1739 of file rpmdb.c.
References _dbiIndexSet::count, and _rpmdbMatchIterator::mi_set.
Referenced by ftsCacheUpdate(), rpmdbFindFpList(), rpmInstall(), rpmmi_Count(), rpmts_AddErase(), and runImmedTriggers().
unsigned int rpmdbGetIteratorFileNum | ( | rpmdbMatchIterator | mi | ) |
Definition at line 1735 of file rpmdb.c.
References _rpmdbMatchIterator::mi_filenum.
Referenced by rpmtsFindPubkey().
unsigned int rpmdbGetIteratorOffset | ( | rpmdbMatchIterator | mi | ) |
Return header join key for current position of rpm database iterator.
mi | rpm database iterator |
Definition at line 1731 of file rpmdb.c.
References _rpmdbMatchIterator::mi_offset.
Referenced by IDTXload(), markReplacedFiles(), rpmErase(), rpmgiNext(), rpmmi_Instance(), rpmpsmStage(), rpmts_AddErase(), rpmtsAddInstallElement(), and rpmtsFindPubkey().
int rpmdbInit | ( | const char * | prefix, | |
int | perms | |||
) |
Initialize database.
prefix | path to top of install tree | |
perms | database permissions |
Definition at line 1142 of file rpmdb.c.
References openDatabase(), RPMDB_FLAG_JUSTCHECK, rpmdbClose(), rpmdbOpenAll(), and rpmExpandNumeric().
Referenced by rpmtsInitDB().
rpmdbMatchIterator rpmdbInitIterator | ( | rpmdb | db, | |
rpmTag | rpmtag, | |||
const void * | keyp, | |||
size_t | keylen | |||
) |
Return database iterator.
db | rpm database | |
rpmtag | rpm tag | |
keyp | key data (NULL for sequential access) | |
keylen | key data length (0 will use strlen(keyp)) |
Definition at line 2490 of file rpmdb.c.
References _, _DBSWAP, _free(), _dbiIndex::dbi_rpmtag, _dbiIndex::dbi_txnid, dbiByteSwapped(), dbiCclose(), dbiCopen(), dbiFindByLabel(), dbiFreeIndexSet(), dbiGet(), dbiOpen(), dbt2set(), _rpmdbMatchIterator::mi_key, _rpmdbMatchIterator::mi_next, rpmdbCheckSignals(), rpmdbFindByFile(), RPMDBI_LABEL, RPMDBI_PACKAGES, rpmdbLink, RPMERR_DBGETINDEX, rpmError, rpmmiRock, RPMTAG_BASENAMES, RPMTAG_NAME, tagName(), _dbswap::ui, xcalloc(), and xmalloc().
Referenced by dbiFindMatches(), main(), rpmdb_length(), rpmdb_Match(), rpmdb_subscript(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRebuild(), rpmdbRemove(), rpmtsInitIterator(), and rpmtsSolve().
Reference a database instance.
db | rpm database | |
msg |
Header rpmdbNextIterator | ( | rpmdbMatchIterator | mi | ) |
Return next package header from iteration.
mi | rpm database iterator |
Definition at line 2166 of file rpmdb.c.
References _, _DBSWAP, _free(), _USE_COPY_LOAD, _dbiIndexSet::count, rpmdb_s::db_bits, rpmdb_s::db_nbits, _dbiIndex::dbi_txnid, dbiByteSwapped(), dbiCopen(), dbiGet(), dbiIndexRecordFileNumber(), dbiIndexRecordOffset(), dbiOpen(), headerToken_s::flags, headerCopyLoad(), HEADERFLAG_ALLOCATED, headerIsEntry(), headerLoad(), _rpmdbMatchIterator::mi_cflags, _rpmdbMatchIterator::mi_data, _rpmdbMatchIterator::mi_db, _rpmdbMatchIterator::mi_dbc, _rpmdbMatchIterator::mi_filenum, _rpmdbMatchIterator::mi_h, _rpmdbMatchIterator::mi_hdrchk, _rpmdbMatchIterator::mi_key, _rpmdbMatchIterator::mi_keylen, _rpmdbMatchIterator::mi_keyp, _rpmdbMatchIterator::mi_modified, _rpmdbMatchIterator::mi_offset, _rpmdbMatchIterator::mi_prevoffset, _rpmdbMatchIterator::mi_set, _rpmdbMatchIterator::mi_setx, _rpmdbMatchIterator::mi_ts, miFreeHeader(), mireSkip(), PBM_ISSET, PBM_REALLOC(), PBM_SET, RPMDBI_PACKAGES, RPMERR_BADHEADER, rpmError, RPMMESS_DEBUG, RPMMESS_ERROR, rpmMessage, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, RPMTAG_NAME, and _dbswap::ui.
Referenced by _rpmtsAddRollbackElement(), checkPackageSet(), dbiFindMatches(), handleInstInstalledFiles(), handleRmvdInstalledFiles(), IDTXload(), main(), markReplacedFiles(), rpmcliShowMatches(), rpmdb_length(), rpmdb_subscript(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRebuild(), rpmdbRemove(), rpmErase(), rpmgiNext(), rpmInstall(), rpmmi_iternext(), rpmpsmStage(), rpmQueryVerify(), rpmts_AddErase(), rpmtsAddInstallElement(), rpmtsFindPubkey(), rpmtsRun(), rpmtsSolve(), runImmedTriggers(), runTriggers(), and unsatisfiedDepend().
int rpmdbOpen | ( | const char * | prefix, | |
rpmdb * | dbp, | |||
int | mode, | |||
int | perms | |||
) |
Open rpm database.
prefix | path to top of install tree |
dbp | address of rpm database |
mode | open(2) flags: O_RDWR or O_RDONLY (O_CREAT also) | |
perms | database permissions |
Definition at line 1134 of file rpmdb.c.
References openDatabase(), and rpmExpandNumeric().
Referenced by main(), rpmtsOpenDB(), and rpmtsOpenSDB().
int rpmdbOpenAll | ( | rpmdb | db | ) |
Open all database indices.
db | rpm database |
Definition at line 822 of file rpmdb.c.
References rpmdb_s::_dbi, dbiOpen(), dbiTags, dbiTagsMax, and isTemporaryDB().
Referenced by rpmdbInit(), rpmdbVerify(), and rpmtsRun().
int rpmdbPruneIterator | ( | rpmdbMatchIterator | mi, | |
int * | hdrNums, | |||
int | nHdrNums, | |||
int | sorted | |||
) |
Remove items from set of package instances to iterate.
mi | rpm database iterator | |
hdrNums | array of package instances | |
nHdrNums | number of elements in array | |
sorted | is the array sorted? (array will be sorted on return) |
Definition at line 2468 of file rpmdb.c.
References dbiPruneSet(), and _rpmdbMatchIterator::mi_set.
Referenced by checkPackageSet(), rpmtsAddInstallElement(), and unsatisfiedDepend().
int rpmdbRebuild | ( | const char * | prefix, | |
rpmts | ts, | |||
rpmRC(*)(rpmts ts, const void *uh, size_t uc, const char **msg) | hdrchk | |||
) |
Rebuild database indices from package headers.
prefix | path to top of install tree | |
ts | transaction set (or NULL) | |
(*hdrchk) | headerCheck() vector (or NULL) |
Definition at line 3746 of file rpmdb.c.
References _, _db_filter_dups, _free(), _rebuildinprogress, _RECNUM, rpmdb_s::db_api, rpmdb_s::db_filter_dups, errno, F_OK, headerCopy(), headerFree(), headerIsEntry(), headerNVR(), Mkdir(), openDatabase(), Rmdir(), RPMDB_FLAG_MINIMAL, rpmdbAdd(), rpmdbClose(), rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbMoveDatabase(), rpmdbNextIterator(), rpmdbRemoveDatabase(), rpmdbSetHdrChk(), rpmdbSetIteratorRE(), rpmDefineMacro(), RPMERR_INTERNAL, RPMERR_MKDIR, rpmError, rpmExpandNumeric(), rpmGetPath(), RPMMESS_DEBUG, RPMMESS_ERROR, RPMMESS_NORMAL, rpmMessage, RPMMIRE_DEFAULT, RPMTAG_BUILDTIME, RPMTAG_HEADERIMAGE, RPMTAG_NAME, RPMTAG_RELEASE, RPMTAG_VERSION, stpcpy(), strerror, and xmalloc().
Referenced by rpmtsRebuildDB().
int rpmdbRemove | ( | rpmdb | db, | |
int | rid, | |||
unsigned int | hdrNum, | |||
rpmts | ts, | |||
rpmRC(*)(rpmts ts, const void *uh, size_t uc, const char **msg) | hdrchk | |||
) |
Remove package header from rpm database and indices.
db | rpm database | |
rid | (unused) remove transaction id (rid = 0 or -1 to skip) | |
hdrNum | package instance number in database | |
ts | (unused) transaction set (or NULL) | |
(*hdrchk) | (unused) headerCheck() vector (or NULL) |
Definition at line 2632 of file rpmdb.c.
References _, _DBSWAP, _free(), alloca(), blockSignals(), dbiByteSwapped(), dbiCclose(), dbiCopen(), dbiDel(), dbiFreeIndexSet(), dbiGet(), dbiIndexNewItem(), dbiOpen(), dbiPruneSet(), dbiPut(), dbiSync(), dbiTags, dbiTagsMax, dbt2set(), headerAddEntry(), headerFreeData(), headerGetEntryMinMemory(), headerLink(), headerNVR(), isTemporaryDB(), nibble(), pgpNewDig(), pgpPrtPkts(), RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), RPMERR_DBCORRUPT, RPMERR_DBGETINDEX, RPMERR_DBPUTINDEX, rpmError, RPMMESS_DEBUG, rpmMessage, RPMTAG_FILEMD5S, RPMTAG_PUBKEYS, RPMTAG_REMOVETID, set2dbt(), tagName(), and _dbswap::ui.
Referenced by rpmpsmStage().
int rpmdbSetHdrChk | ( | rpmdbMatchIterator | mi, | |
rpmts | ts, | |||
rpmRC(*)(rpmts ts, const void *uh, size_t uc, const char **msg) | hdrchk | |||
) |
Modify iterator to verify retrieved header blobs.
mi | rpm database iterator | |
ts | transaction set | |
(*hdrchk) | headerCheck() vector |
Definition at line 2151 of file rpmdb.c.
References _rpmdbMatchIterator::mi_hdrchk, and _rpmdbMatchIterator::mi_ts.
Referenced by rpmdbRebuild(), and rpmtsInitIterator().
int rpmdbSetIteratorModified | ( | rpmdbMatchIterator | mi, | |
int | modified | |||
) |
Modify iterator to mark header for lazy write on release.
mi | rpm database iterator | |
modified | new value of modified |
Definition at line 2141 of file rpmdb.c.
References _rpmdbMatchIterator::mi_modified.
Referenced by markReplacedFiles().
int rpmdbSetIteratorRE | ( | rpmdbMatchIterator | mi, | |
rpmTag | tag, | |||
rpmMireMode | mode, | |||
const char * | pattern | |||
) |
Add pattern to iterator selector.
mi | rpm database iterator | |
tag | rpm tag | |
mode | type of pattern match | |
pattern | pattern to match |
Definition at line 1898 of file rpmdb.c.
References _free(), miRE_s::cflags, miRE_s::eflags, miRE_s::fnflags, _rpmdbMatchIterator::mi_nre, _rpmdbMatchIterator::mi_re, mireCmp(), mireDup(), miRE_s::mode, miRE_s::notmatch, miRE_s::pattern, miRE_s::preg, RPMERR_REGCOMP, rpmError, rpmExpand(), RPMMIRE_DEFAULT, RPMMIRE_GLOB, RPMMIRE_REGEX, RPMMIRE_STRCMP, miRE_s::tag, xcalloc(), and xrealloc().
Referenced by dbiFindMatches(), IDTXload(), rpmdbRebuild(), rpmgiInitFilter(), rpmmi_Pattern(), rpmpsmStage(), rpmtsInitIterator(), and rpmtsRun().
int rpmdbSetIteratorRewrite | ( | rpmdbMatchIterator | mi, | |
int | rewrite | |||
) |
Prepare iterator for lazy writes.
mi | rpm database iterator | |
rewrite | new value of rewrite |
Definition at line 2128 of file rpmdb.c.
References _rpmdbMatchIterator::mi_cflags.
Referenced by markReplacedFiles().
int rpmdbSync | ( | rpmdb | db | ) |
Sync all database indices.
db | rpm database |
Definition at line 926 of file rpmdb.c.
References rpmdb_s::_dbi, rpmdb_s::db_ndbi, _dbiIndex::dbi_no_dbsync, and dbiSync().
Referenced by rpmtsRun().
Unreference a database instance.
db | rpm database | |
msg |
int rpmdbVerify | ( | const char * | prefix | ) |
Verify database components.
prefix | path to top of install tree |
Definition at line 1163 of file rpmdb.c.
References rpmdb_s::_dbi, rpmdb_s::db_ndbi, dbiVerify(), openDatabase(), rpmdbClose(), rpmdbOpenAll(), and rpmExpandNumeric().
Referenced by rpmtsVerifyDB().
int* dbiTags |
Tags for which rpmdb indices will be built.
Definition at line 61 of file rpmdb.c.
Referenced by dbiTagsInit(), dbiTagToDbix(), main(), openDatabase(), rpmdbAdd(), rpmdbCloseDBI(), rpmdbMoveDatabase(), rpmdbOpenAll(), rpmdbRemove(), and rpmdbRemoveDatabase().