Commit Graph

28 Commits

Author SHA1 Message Date
jbj ac47974f08 fix stupid mistakes (alpha segfaults).
CVS patchset: 3726
CVS date: 2000/05/12 23:30:28
2000-05-12 23:30:28 +00:00
jbj 4a4704f98f - include RPM-GPG-KEY in file manifest.
- simplify --last popt alias, date like -qi (bjerrick@easystreet.com).
- fix: alloca'd memory used outside of scope (alpha segfault).

CVS patchset: 3723
CVS date: 2000/05/10 15:36:29
2000-05-10 15:36:29 +00:00
jbj 764e820f16 Repair rebuilddb lossage, removing debug messages and final copy on user msgs.
Initialize dbN vector from dbNopen.
Use db3 return convention for dbNopen.
Always save tag index in join key.
Rename rpmdbAppendIteratorMatches -> rpmdbAppendIterator.
Remove tolerant from rpmdbRemove API.
Use hdrNum rather than offset, tagNum rather than fileNumber most everywhere.
rpmdb.c: Create rpmdbPruneIterator to exclude items from set.
rpmdb.c: Remove legacy code from rpmdbAdd/rpmdbRemove.
rpmdb.c: Rename (shorten) many routines.
tagName.c: prepare for ADDED/REMOVED/AVAILABLE temorary databases.
depends.c: use rpmdbPruneIterator.
depends.c: don't check ranges unless provides names match.
depends.c: Depends now works (watch out for data values of 0).
rpmpopt.in: Add --dbapi and --rebuilddbapi options.

CVS patchset: 3720
CVS date: 2000/05/07 00:53:11
2000-05-07 00:53:11 +00:00
jbj c19f4c1c31 Add usedbenv (disabled) to use db3 as db1 was used.
Configure to accept any db api (but rebuild will switch to db3).
Rename *_major to *_api throughout.
Always open Depends with O_CREAT|O_RDWR.
db1.c: use good ol' requredby.rpm name, not requiredbyindex.rpm.
db1.c: hide pkgs FD_t in dbi_db, eliminate dbi_pkgs.
depends.c: Skip Depends caching on dbiPut failure (e.g. perms).
rpmdb.c: remove _useDbiMajor, pass dbapi on call.
rpmdb.c: repair rot in rpmdbRemoveDatabase()/rpmdbMoveDatabase().
rpmdb.c: disable ^C hack in signal block/unblock.

CVS patchset: 3712
CVS date: 2000/05/02 08:30:31
2000-05-02 08:30:31 +00:00
jbj 73f95c99ce Rename db0.c to db1.c, resurrect db2.c (from db3.c).
Add ia64 and sparc64 changes.
rpm.spec: add per-platform sub-directories.
Add rpmdbSync to API.
installplatform: pass LIB=lib64 on sparc64.
db3.c: Add nodbsync, lockdbfd, debug dbi configuration.
db3.c: don't check dbi_mode when deciding on DB_WRITECURSOR.

CVS patchset: 3711
CVS date: 2000/05/01 17:50:35
2000-05-01 17:50:35 +00:00
jbj 5197d92f13 Don't incrementally link pthreads, causes segfault on (at least) alpha.
db0.c: Simulate db->sync on falloc.
db0.c: Use RPMDBI_PACKAGES for rpmtag comparisons.
db0.c: Add debug for dbi open/close like db3.
db0.c: Remove dbi if temporary (i.e. Depends).
db3.c: Filter DB_INCOMPLETE from db->sync return, it's usually harmless.
depends.c: Free Depends iterator, pass keylen, and use cursors.
depends.c: Free iterator *after* loop, not at end of 1st pass.
rpmdb.c: Fine grained cursor locks to avoid "crossed cursors" deadlocks.
rpmdb.c: Lazy open/close during rpmdbAdd/rpmdbRemove/openDatabase.
rpmdb.c: Remove last remnants of dbix, do dynamic lookup instead.
rpmdb.c: Resurrect rpmdbUpdateRecord in iterator loop.
macros.in: Add Depends dbi to config.
macros.in: Configure "nommap:mp_size=2Mb:pagesize=16Kb".

CVS patchset: 3707
CVS date: 2000/04/28 15:14:47
2000-04-28 15:14:47 +00:00
jbj 24a64f2739 - API: replace rpmdbUpdateRecord with rpmdbRemove/rpmdbAdd.
- API: replace rpmdbFindByLabel with RPMDBI_LABEL iteration.
- API: replace rpmdbGetRecord with iterators.
- API: replace findMatches with iterators.

CVS patchset: 3704
CVS date: 2000/04/27 00:10:28
2000-04-27 00:10:28 +00:00
jbj b24f837828 Rip out remaining legacy dbi interfaces.
Add flags to all calls.
Create dbi interface wrapper to vectors.

CVS patchset: 3701
CVS date: 2000/04/26 14:06:16
2000-04-26 14:06:16 +00:00
jbj 9c0c7e9fbd Sanity.
CVS patchset: 3697
CVS date: 2000/04/25 19:41:37
2000-04-25 19:41:37 +00:00
jbj b5cadb90d6 make db indices as lightweight as possible, with per-dbi config.
db1.c will never be needed, eliminate.
API: merge rebuilddb.c into rpmdb.c.

CVS patchset: 3694
CVS date: 2000/04/23 20:37:57
2000-04-23 20:37:57 +00:00
jbj ac6c6b7704 fix: legacy packages required provides EVR/Flags to be added.
fix: generating provides EVER was broke with epoch.
db3 tuned for installer speed (i.e. no locking, create/remove on fly).
add new_db_api and old_db_api macros to control precisely for db version used.

CVS patchset: 3691
CVS date: 2000/04/21 00:21:15
2000-04-21 00:21:15 +00:00
jbj f75d794af4 Change iterator interface to use RPMTAG_FOO rather than RPMDBI_FOO.
CVS patchset: 3687
CVS date: 2000/04/19 22:15:02
2000-04-19 22:15:02 +00:00
jbj bb4eafd53d Data size of index databases now per-index (was always 8 bytes).
Global rpm data base parameterization used per-index.

CVS patchset: 3684
CVS date: 2000/04/19 15:26:10
2000-04-19 15:26:10 +00:00
jbj 588daae4b4 Consolidate changes into rpmdb.c.
CVS patchset: 3683
CVS date: 2000/04/18 18:11:43
2000-04-18 18:11:43 +00:00
jbj 29fa01b329 Start composting db interfaces.
CVS patchset: 3680
CVS date: 2000/04/17 12:28:58
2000-04-17 12:28:58 +00:00
jbj b33d2bf245 Pass key as void *, not char *.
CVS patchset: 3669
CVS date: 2000/04/12 16:29:03
2000-04-12 16:29:03 +00:00
jbj f3571adf59 API: pass *SearchIndex() length of key (0 will use strlen(key)).
API: remove rpmdb{First,Next}RecNum routines.
db3.c: remove cursor DB_RMW implementation, something else is needed.
rpmdb.c: first crack at rpmdb match iterator.
query.c: ditto.
rebuilddb.c: ditto.
dumpdb.c: ditto.

CVS patchset: 3668
CVS date: 2000/04/12 13:42:57
2000-04-12 13:42:57 +00:00
jbj fc40e956bf make header db a "special" type of index database in db0, hiding falloc.c.
header retrieval from db does not guarantee any alignment.
eliminate dbiGetFirstKey method in db vectors.
add db{copen,cclose,cget,join} methods in db vectors.
clean up __db.NNN files from failed db3 open.

CVS patchset: 3666
CVS date: 2000/04/11 15:28:07
2000-04-11 15:28:07 +00:00
jbj df023d73e8 Hash package headers using simple counter.
CVS patchset: 3664
CVS date: 2000/04/08 19:28:08
2000-04-08 19:28:08 +00:00
jbj eb75d9280b use "rpmdb db" consistently throughout, add doxygen tags.
db3.c: save join keys in endian neutral binary format.
rpmdb.c: create rpmdbCountPackages().
install.c: use rpmdbCountPackages().
uninstall.c: Ditto.

CVS patchset: 3662
CVS date: 2000/04/07 16:09:25
2000-04-07 16:09:25 +00:00
jbj 9763902847 use hashed access for package headers.
CVS patchset: 3660
CVS date: 2000/04/06 15:20:29
2000-04-06 15:20:29 +00:00
jbj c2ced00559 Permit dboffsets in hex and octal.
CVS patchset: 3658
CVS date: 2000/04/04 09:27:48
2000-04-04 09:27:48 +00:00
jbj a8f6f02bc1 Permit db3 paramaters from macro.
Permit private dbcursor (but this will go away soon).

CVS patchset: 3655
CVS date: 2000/04/03 14:30:24
2000-04-03 14:30:24 +00:00
jbj 24fbbd3954 db3 configured for testing with (DB_INIT_MPOOL|DB_INIT_CDB|DB_SYSTEM_MEM).
CVS patchset: 3647
CVS date: 2000/03/31 14:33:40
2000-03-31 14:33:40 +00:00
jbj 920d26a515 fix: duplicate free in db3.
Use Berkeley "home" db directory with relative rather than absolute paths.

CVS patchset: 3646
CVS date: 2000/03/31 09:33:17
2000-03-31 09:33:17 +00:00
jbj 00914dd961 Mostly functional db2 interface, db3 still has problems.
CVS patchset: 3645
CVS date: 2000/03/30 19:22:46
2000-03-30 19:22:46 +00:00
jbj 353a2811a4 add db3 to the pile, isolate all with incremental link and vectors.
CVS patchset: 3643
CVS date: 2000/03/27 15:55:07
2000-03-27 15:55:07 +00:00
jbj 62381feb62 Compilation with db3.
CVS patchset: 3642
CVS date: 2000/03/27 11:13:25
2000-03-27 11:13:25 +00:00