Age | Commit message (Collapse) | Author | Files | Lines |
|
- 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.
|
|
- 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.
|
|
- 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?)
|
|
- 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.
|
|
|
|
- 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
|
|
from the API
|
|
- 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
|
|
- 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
|
|
|
|
- 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
|
|
- txnid (which is unused...) is stored in dbi so dbiCopen() can already
get to it
|
|
|
|
- index names are rpm tag names, period
- also we dont need to strdup() the tag name, rpmTagGetName() returns
pointers to const strings these days
|
|
|
|
|
|
|
|
- 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
|
|
|
|
- we dont want anything to do with System V IPC, really... BDB uses
file backed mmap when it needs, this suits us just fine
|
|
- 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
|
|
- 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
|
|
- with the exception subfile (used by now extinct sqlite backend)
none of this was ever even connected to the bdb configuration...
|
|
- we want to use our own allocators for exit-on-enomem behavior but
having per-index allocator configuration makes no sense whatsoever
|
|
|
|
Also remove abstraction layer between rpmdb.h and the back end
in lib/backend/
|
|
- enabling this as-is would be murderous to multilib systems
- getting duplicates in the db would be a bug elsewhere
|
|
- 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
|
|
|
|
|
|
- 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
|
|
|
|
|
|
and their implementations in the backends
|
|
- 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...
|
|
|
|
fit in there
|
|
|
|
|
|
|
|
- the split is largely arbitrary and mostly just causes, well, arbitrary
issues and limitations
- just move content from rpmdb/ to lib/ for now
|