summaryrefslogtreecommitdiff
path: root/lib/rpmdb_internal.h
AgeCommit message (Collapse)AuthorFilesLines
2012-08-30Store transaction element pointers in the removedPkgs hashPanu Matilainen1-1/+12
- Change the hashtype name to something else, its no longer a plain int hash. Still needs double definition as its not contained in a single source (might want a wrapper similar to rpmal), but slightly more contained now than the previous intHash definition. - This opens up some new possibilities, to be taken advantage of in later commits.
2010-12-13Replace verified header tracking bitfield with a hash tablePanu Matilainen1-10/+0
- No functional changes, but allows getting rid of yet another custom (re)allocation scheme + ugly bitfield manipulation macros. Also the header instance numbers can be rather sparse, making hash a natural fit for the purpose.
2010-12-03Internalize most direct rpmdb manipulation functionsPanu Matilainen1-0/+62
- Since rpm 4.1 times, callers are supposed to use the rpmtsFooDB() variants instead of the lower-level rpmdb functions, and mixing them is not safe. Enforce the use of ts-level versions by making rpmdbLink(), rpmdbOpen(), rpmdbInit(), rpmdbClose(), rpmdbSync(), rpmdbVerify() and rpmdbRebuild() internal-only. - Doing this now to eliminate a few needs for breaking API again in 4.10 (one can wish, right?)
2010-10-26Separate match iterator allocation vs initializationPanu Matilainen1-0/+10
- There's exactly one spot within rpm which needs the former behavior of rpmdbInitIterator() on a secondary index with keyp of NULL: rpmFindBaseNamesInDB(): it wants an empty iterator on RPMDBI_BASENAMES, which is then extended as it progresses. Starting with commit c70e076e088589f65160c05ee7cc8db0b3db6d7e, rpmdbInitIterator() however returns the actual index in that case, which is not optimal for rpmFindBaseNamesInDB(). Handle the basenames in db as the special case it is, and have it explicitly create an empty iterator with the new call.
2010-09-21Missing c++ end marker in rpmdb_internal.h, oopsPanu Matilainen1-0/+4
2010-05-07Revert back to rpmdbRemove() taking instance number instead of actual headerPanu Matilainen1-2/+2
- On package reinstall (ie --replacepkgs) we only know the old header by the instance number, and grabbing the header from the db in psm as a special case for that is more trouble than just doing what we always did. - Reverts commit e16695e932e294ec600e673d38c41bde20931204 and unbreaks the --replacepkgs test case
2010-05-06Convert tsmem->removedPackages to a hash table and remove rpmdbPruneIterator ↵Florian Festi1-0/+19
from the API
2010-04-07Make rpmdbAdd() and rpmdbRemove() internal-onlyPanu Matilainen1-0/+18
- all additions and removals to the rpmdb need to go through the transaction machinery, these are very low-level functions that API users have no business messing with
2010-04-07Stash rpmdb struct definition out of sight into dbi.hPanu Matilainen1-29/+0
- not perhaps the ideal place for it but the backend level needs access to the main db in several places anyway, and this leaves rpmdb_internal.h clear for internal-only APIs
2010-04-06Bury rpmdb flags inside rpmdb.c, not used by anything outside itPanu Matilainen1-10/+0
2010-04-01Split dbiIndex out of rpmdb_internal.h into header of its ownPanu Matilainen1-185/+1
- the dbi presents an internal api of its own, and deserves a separate header (baby steps to making dbiIndex opaque outside the backend) - move dbiVerify() to the backend where it belongs - mark all the dbiFoo() functions as internal
2010-04-01Eliminate unnecessary argument to dbiCopen()Panu Matilainen1-3/+1
- txnid (which is unused...) is stored in dbi so dbiCopen() can already get to it
2010-03-31Database metadata integer byte order is not user serviceable configPanu Matilainen1-1/+0
2010-03-31Lose dbi file configuration optionPanu Matilainen1-1/+1
- index names are rpm tag names, period - also we dont need to strdup() the tag name, rpmTagGetName() returns pointers to const strings these days
2010-03-31Make dbiVerify() and dbiOpen() static, not needed outside rpmdb.cPanu Matilainen1-25/+0
2010-03-31Bury dbiIndexItem and dbiIndexSet structs inside rpmdb.cPanu Matilainen1-31/+0
2010-03-31Make dbiIndexSet operations static inside rpmdb.cPanu Matilainen1-34/+0
2010-03-31Lose the BDB access method configuration optionsPanu Matilainen1-21/+0
- In the ~10 years of their existance none of them have been used, and besides users have no business messing with fundamental database behavior such as whether duplicates are allowed or not
2010-03-31We really dont care about macro expanded per-db error prefixPanu Matilainen1-1/+0
2010-03-31Lose shmkey + shared BDB config optionsPanu Matilainen1-1/+0
- we dont want anything to do with System V IPC, really... BDB uses file backed mmap when it needs, this suits us just fine
2010-03-31We dont have any temporary databases anymore, lose the config switchesPanu Matilainen1-2/+0
- The last temporary db was Depends which is now replaced with an in-memory hash, and the temporary dbs were troublesome with chroot operations anyway, good riddance
2010-03-31Lose pointless per-db and per-dbi errfile and errcall pointersPanu Matilainen1-4/+0
- BDB uses stderr for errfile when not set, which is what we set it to through various hoops. Just leave it alone. - db_errcall has always been (intentionally) NULL to disable that output, the errors get logged though cvtdberr() with slight filtering
2010-03-31Shred a pile of BDB config goo that's never been actually implementedPanu Matilainen1-19/+0
- with the exception subfile (used by now extinct sqlite backend) none of this was ever even connected to the bdb configuration...
2010-03-31Shed the pointless per-dbi memory allocatorsPanu Matilainen1-5/+1
- we want to use our own allocators for exit-on-enomem behavior but having per-index allocator configuration makes no sense whatsoever
2010-03-31Eliminate now unnecessary db_ndbi field, number of indexes is constantPanu Matilainen1-1/+0
2009-12-07Remove support for sqlite based rpm databaseFlorian Festi1-180/+38
Also remove abstraction layer between rpmdb.h and the back end in lib/backend/
2009-09-22Remove ancient, unused code to filter duplicates on rpmdb rebuildPanu Matilainen1-1/+0
- enabling this as-is would be murderous to multilib systems - getting duplicates in the db would be a bug elsewhere
2009-09-21Move rpmdb home creation from backends to one level higherPanu Matilainen1-0/+1
- this is a common operation for any backends, avoid duplication - only try to create it once instead of every index open, and if it doesn't exist and cant be created, error out instead of trying to continue in vain
2009-09-21Add an internal API for getting rpmdb home wrt chroot state, use itPanu Matilainen1-0/+9
2009-09-21Remove pointless per-index api versionPanu Matilainen1-1/+0
2009-09-21Remove BDB RPC "support"Panu Matilainen1-4/+0
- it's insecure, used by nobody (its been rather broken for a long time) and all, but BDB 4.8.x removed RPC support from upstream so we cant very well support in the future even if we wanted to
2009-09-21Per-dbi root and home dont make sense, always use rpmdb pathsPanu Matilainen1-2/+0
2009-01-09Implement dbiGet and dbiPut as normal functionFlorian Festi1-20/+4
2009-01-09Remove unused database intex functions: dbiCdup, dbiAssociate, dbiPget, dbiJoinFlorian Festi1-115/+0
and their implementations in the backends
2008-11-29Unify dbiIndexSet allocations, allocate in power-of-two sizesPanu Matilainen1-0/+1
- allocating in even sized chunks helps avoiding crazy memory fragmentation when resizing a lot (rhbz#472507) - HEAD doesn't really need, rpm 4.6.x does, but doesn't hurt either...
2008-11-29Use proper type (unsigned) for index set offset/countPanu Matilainen1-2/+2
2008-11-28Delete _dbiIndexItem.fpNum as it is no longer used and also does not really ↵Florian Festi1-1/+0
fit in there
2008-11-24Expose rpmdbSortIterator in rpmdb_internal.hFlorian Festi1-0/+7
2008-11-24Add rpmdbExtendIterator to do repeated searchesFlorian Festi1-0/+10
2008-10-09Mark rpmdb internals as internals, including the "mergesort" gemPanu Matilainen1-0/+10
2008-05-12Start (re-)joining librpmdb and librpmPanu Matilainen1-0/+665
- the split is largely arbitrary and mostly just causes, well, arbitrary issues and limitations - just move content from rpmdb/ to lib/ for now