summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-09-22Remove no longer necessary RPMDBI_PACKAGES special casingPanu Matilainen1-4/+0
2009-09-22Fix endless loop on RPMDBI_PACKAGES iteration when offset specifiedPanu Matilainen1-2/+4
2009-09-22Unbreak --tid and --querybynumberPanu Matilainen1-34/+10
- broken ages ago somewhere between 4.4.x and 4.6.x by typing changes presumably - C99 strtoul() can figure the base on its own, remove unnecessary work
2009-09-22DB_INCOMPLETE was removed in BDB 4.1 and we dont support older versionsPanu Matilainen1-5/+3
2009-09-22Remove ancient, unused code to filter duplicates on rpmdb rebuildPanu Matilainen2-28/+0
- enabling this as-is would be murderous to multilib systems - getting duplicates in the db would be a bug elsewhere
2009-09-21Rip out dependency cachingPanu Matilainen2-95/+0
- it doesn't speed up things that much, is broken in some chroot scenarios and is ugly ugly hardwired BDB hackery where it doesn't belong
2009-09-21Move rpmdb home creation from backends to one level higherPanu Matilainen4-12/+10
- 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 Matilainen3-19/+27
2009-09-21Remove pointless per-index api versionPanu Matilainen2-4/+3
2009-09-21DB config stuff not needed outside dbconfig.c, make them staticPanu Matilainen1-5/+4
- additionally make the popt struct const since it can...
2009-09-21BDB is not optional at least currently, remove useless ifdefsPanu Matilainen1-6/+0
2009-09-21Remove useless no-op "teardown" and "usecursors" config bitsPanu Matilainen1-9/+1
2009-09-21Remove BDB RPC "support"Panu Matilainen3-73/+20
- 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-21Remove XA "support" from the backendPanu Matilainen1-3/+0
- it's removed from BDB 4.8.x and this has hardly ever done anything anyway
2009-09-21Remove unused db/dbenv methods "documentary" from the sourcePanu Matilainen1-38/+0
2009-09-21Use db3Free() for on sqlite backend close tooPanu Matilainen1-6/+1
2009-09-21Always populate dbi->dbi_file on db3New()Panu Matilainen3-34/+15
- Only the actual db->open() wants NULL for temporary databases, everywhere else we want the tag name. Handle the temporary case where it counts instead of complicating things everywhere for the one special case.
2009-09-21Mop up leftover root/home foobarPanu Matilainen2-32/+7
2009-09-21Per-dbi root and home dont make sense, always use rpmdb pathsPanu Matilainen4-20/+11
2009-09-18Sigh.. when not using environment, absolute paths are requiredPanu Matilainen1-1/+7
2009-09-17Always open database files relative to database homePanu Matilainen1-8/+1
- This allows the db to move freely wherever (such as across chroots, RhBug:507309 and pile of related issues) .. and is even recommended by BDB documentation. Well duh.
2009-09-17Have BDB use our allocation routines now that we canPanu Matilainen2-5/+5
- rfree() prototype doesn't match free() but it doesn't matter in this case as it's just a convencience wrapper with no extra functionality and setting NULL is ok according to BDB docs - db->set_alloc() can't be used if environment is used, fix the condition
2009-09-17Eliminate unnecessary variablePanu Matilainen1-7/+4
2009-09-16Remove unused local variableFlorian Festi1-1/+0
2009-09-16Remove db environment on close on chrooted operationsPanu Matilainen2-2/+4
- As we open the db from outside the chroot, the environment ends up containing paths that are not valid once we enter the chroot causing dumb issues like RhBug:513699 and RhBug:507309. - We'd be better off removing the environment always after access but limiting to chroots for now as the rpmdb open/close path is full of races when environment is not present. Chroots are somewhat special environemnts anyway and typically not concurrently accessed so it's less of an issue there. - While this still has all sorts of issues, it at least leaves the rpmdb in chroot in a functional state after initial install.
2009-09-16Move the default transaction lock out of BDB environment namespacePanu Matilainen1-1/+1
- We dont want the transaction lock to get mixed with the BDB environment, nor do we want it wiped out with it as the ts lock protects things *around* the environment. Unlike the environment, any fcntl locks on the file get released when process dies, so if there is a lock, there's a process alive holding it and you'd better not remove it. - Use the same lock path in macro configuration and built-in fallback - Make it a hidden file to avoid people confusing lock file existence with it actually being locked
2009-09-16There's a function to test string equivalence...Panu Matilainen2-5/+5
2009-09-16Throw out useless db statistics structsPanu Matilainen1-47/+0
- besides being completely unused, these structs are defined by BDB public headers, no need to mirror them in rpm
2009-09-16Throw out pile of unused "stuff" from 2002Panu Matilainen1-71/+0
2009-09-16Minor cleanup to newRpmdb()Panu Matilainen1-6/+1
- no need to free what hasn't been allocated yet
2009-09-16One complicated way to write xstrdup() .. pffPanu Matilainen1-10/+3
- sqlite backend uses dbi subfile for table name, leave it alone although it is the same as the file name... - allocate + free both file and table name separately
2009-09-16Eliminate long since unused db subfile from bdb codePanu Matilainen1-24/+2
2009-09-16Remove unnecessary arguments to db init and finiPanu Matilainen1-20/+9
- bdb environments are per db_home, not per file so dbfile etc dont make sense here
2009-09-16Also skip to be erased files in "netsharedpath"Florian Festi1-33/+80
fixes rhbz#494640
2009-09-15Take non-gi errors into account too (SuseBug:527191)Panu Matilainen1-1/+1
- patch from OpenSUSE / Michael Schroeder
2009-09-15Don't add dependency type into file requires and provides (RhBug:523282)Panu Matilainen1-1/+1
- unintended change in commit 3d8656f040d2c780c88d0cd63594898f0605a6fa
2009-09-14Clean up rpmalAllFileSatisfiesDepend() a bitPanu Matilainen1-40/+34
- avoid multiple strrchr() calls - avoid _constfree(), the string size is known from strrchr() so we dont need to allocate on heap at all
2009-09-10Rip the broken asynchronous psm machineryPanu Matilainen6-37/+1
- it was only "used" for the ldconfig optimization and actually been completely broken since the ordering rewrite
2009-09-10Rip the broken ldconfig optimization hack (RhBug:513224)Panu Matilainen1-25/+0
- it doesn't optimize much and what's worse, it sometimes optimizes out calls that would've been necessary
2009-09-10Rip unnecessary headerDump() and the last ancient artifacts using itPanu Matilainen2-141/+0
- xml format dump gives an output that can actually be further processed
2009-09-10Rip unused and useless headerGetLangs()Panu Matilainen2-28/+0
- nothing in the world uses it and the info is available through regular headerGet() anyway
2009-09-10Rip unused and useless headerUsageCount()Panu Matilainen1-10/+0
2009-09-09Eliminate unused goo from findEntry()Panu Matilainen1-11/+2
2009-09-09Handle NULL header in doHeaderUnload()Panu Matilainen1-2/+2
- avoids having to separately check elsewhere and avoids segfaulting on headerUnload() and headerReload() on NULL headers
2009-09-09Eliminate pointless incrementPanu Matilainen1-1/+0
2009-09-09Eliminate yet more unused calculations from header code...Panu Matilainen1-5/+1
2009-09-09Eliminate unused pad calculations from header codePanu Matilainen1-8/+0
2009-09-09Eliminate yet another unused variable in header codePanu Matilainen1-2/+0
2009-09-09Eliminate last remaining leftovers from "8/98 bug" workaroundPanu Matilainen1-6/+0
- the ieprev calculations aren't used for anything, should've been in commit 4d0d54492c7d539cc806ca9e7fa59e919c28e45d really
2009-09-09Eliminate unnecessary variable & related goo from regionSwab()Panu Matilainen1-9/+5