diff options
author | jbj <devnull@localhost> | 2001-06-12 17:06:47 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-06-12 17:06:47 +0000 |
commit | 7233e3ad7373eec14ca47dc292806deb986519b1 (patch) | |
tree | 833c57e8e16b984435a66eb4a16cc5510dd3d0a3 /rpmdb | |
parent | 1b87bd9ef75810794edede55d94c25c5d1e94d41 (diff) | |
download | rpm-7233e3ad7373eec14ca47dc292806deb986519b1.tar.gz rpm-7233e3ad7373eec14ca47dc292806deb986519b1.tar.bz2 rpm-7233e3ad7373eec14ca47dc292806deb986519b1.zip |
- remove rpmrc Provides: Yet Again, use virtual packages.
- dump cursor debugging wrappers.
- rpm --verify can disable rpmFileAttr checks.
CVS patchset: 4856
CVS date: 2001/06/12 17:06:47
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/poptDB.c | 1 | ||||
-rw-r--r-- | rpmdb/rpmdb.c | 41 | ||||
-rw-r--r-- | rpmdb/rpmdb.h | 12 |
3 files changed, 21 insertions, 33 deletions
diff --git a/rpmdb/poptDB.c b/rpmdb/poptDB.c index 0d9ee1fe9..ef6cc2c8a 100644 --- a/rpmdb/poptDB.c +++ b/rpmdb/poptDB.c @@ -6,7 +6,6 @@ #include "system.h" #include <rpmcli.h> -#include <rpmurl.h> #include "debug.h" diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index e3d7669e3..015ebe056 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -11,8 +11,7 @@ static int _debug = 0; #include <signal.h> #include <sys/signal.h> -#include <rpmlib.h> -#include <rpmmacro.h> /* XXX for rpmGetPath/rpmGenPath */ +#include <rpmcli.h> #include "rpmdb.h" #include "fprint.h" @@ -28,11 +27,7 @@ static int _debug = 0; extern int _noDirTokens; /*@=redecl@*/ static int _rebuildinprogress = 0; -static int _db_filter_dups = 1; - -/*@-exportlocal -exportheadervar@*/ -int _filterDbDups = 0; /* Filter duplicate entries ? (bug in pre rpm-3.0.4) */ -/*@=exportlocal =exportheadervar@*/ +static int _db_filter_dups = 0; #define _DBI_FLAGS 0 #define _DBI_PERMS 0644 @@ -145,29 +140,29 @@ static struct _dbiVec *mydbvecs[] = { }; /*@=nullassign@*/ -INLINE int dbiSync(dbiIndex dbi, unsigned int flags) { +INLINE int dbiSync(dbiIndex dbi, unsigned int flags) +{ if (_debug < 0 || dbi->dbi_debug) fprintf(stderr, " Sync %s\n", tagName(dbi->dbi_rpmtag)); return (*dbi->dbi_vec->sync) (dbi, flags); } -INLINE int dbiByteSwapped(dbiIndex dbi) { +INLINE int dbiByteSwapped(dbiIndex dbi) +{ return (*dbi->dbi_vec->byteswapped) (dbi); } -INLINE int XdbiCopen(dbiIndex dbi, /*@out@*/ DBC ** dbcp, unsigned int flags, - const char * f, unsigned int l) +INLINE int dbiCopen(dbiIndex dbi, /*@out@*/ DBC ** dbcp, unsigned int flags) { if (_debug < 0 || dbi->dbi_debug) -fprintf(stderr, "+++ RMW %s %s (%s:%u)\n", tagName(dbi->dbi_rpmtag), ((flags & DBI_WRITECURSOR) ? "WRITECURSOR" : ""), f, l); +fprintf(stderr, "+++ RMW %s %s\n", tagName(dbi->dbi_rpmtag), ((flags & DBI_WRITECURSOR) ? "WRITECURSOR" : "")); return (*dbi->dbi_vec->copen) (dbi, dbcp, flags); } -INLINE int XdbiCclose(dbiIndex dbi, /*@only@*/ DBC * dbcursor, unsigned int flags, - const char * f, unsigned int l) +INLINE int dbiCclose(dbiIndex dbi, /*@only@*/DBC * dbcursor, unsigned int flags) { if (_debug < 0 || dbi->dbi_debug) -fprintf(stderr, "--- RMW %s (%s:%u)\n", tagName(dbi->dbi_rpmtag), f, l); +fprintf(stderr, "--- RMW %s\n", tagName(dbi->dbi_rpmtag)); return (*dbi->dbi_vec->cclose) (dbi, dbcursor, flags); } @@ -180,7 +175,8 @@ static int printable(const void * ptr, size_t len) /*@*/ return 1; } -INLINE int dbiDel(dbiIndex dbi, DBC * dbcursor, const void * keyp, size_t keylen, unsigned int flags) +INLINE int dbiDel(dbiIndex dbi, DBC * dbcursor, + const void * keyp, size_t keylen, unsigned int flags) { int NULkey; int rc; @@ -239,7 +235,8 @@ if (_debug < 0 || dbi->dbi_debug) { return rc; } -INLINE int dbiPut(dbiIndex dbi, DBC * dbcursor, const void * keyp, size_t keylen, +INLINE int dbiPut(dbiIndex dbi, DBC * dbcursor, + const void * keyp, size_t keylen, const void * datap, size_t datalen, unsigned int flags) { int NULkey; @@ -827,14 +824,14 @@ static /*@only@*/ /*@null@*/ rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, /*@kept@*/ /*@null@*/ const char * home, int mode, int perms, int flags) - /*@modifies _filterDbDups @*/ + /*@modifies _db_filter_dups @*/ { rpmdb db = xcalloc(sizeof(*db), 1); const char * epfx = _DB_ERRPFX; static int _initialized = 0; if (!_initialized) { - _filterDbDups = rpmExpandNumeric("%{_filterdbdups}"); + _db_filter_dups = rpmExpandNumeric("%{_filterdbdups}"); _initialized = 1; } @@ -861,7 +858,7 @@ rpmdb newRpmdb(/*@kept@*/ /*@null@*/ const char * root, db->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL); /*@=nullpass@*/ db->db_remove_env = 0; - db->db_filter_dups = _filterDbDups; + db->db_filter_dups = _db_filter_dups; db->db_ndbi = dbiTagsMax; db->_dbi = xcalloc(db->db_ndbi, sizeof(*db->_dbi)); /*@-globstate@*/ return db; /*@=globstate@*/ @@ -1492,7 +1489,7 @@ int rpmdbSetIteratorModified(rpmdbMatchIterator mi, int modified) { return rc; } -Header XrpmdbNextIterator(rpmdbMatchIterator mi, const char * f, unsigned l) +Header rpmdbNextIterator(rpmdbMatchIterator mi) { dbiIndex dbi; void * uh = NULL; @@ -1517,7 +1514,7 @@ Header XrpmdbNextIterator(rpmdbMatchIterator mi, const char * f, unsigned l) * marked with DB_WRITECURSOR as well. */ if (mi->mi_dbc == NULL) - xx = XdbiCopen(dbi, &mi->mi_dbc, (mi->mi_cflags | DBI_ITERATOR), f, l); + xx = dbiCopen(dbi, &mi->mi_dbc, (mi->mi_cflags | DBI_ITERATOR)); dbi->dbi_lastoffset = mi->mi_prevoffset; top: diff --git a/rpmdb/rpmdb.h b/rpmdb/rpmdb.h index c5d2728ed..2d28d9f6a 100644 --- a/rpmdb/rpmdb.h +++ b/rpmdb/rpmdb.h @@ -31,6 +31,7 @@ struct _dbiIndexItem { unsigned int dbNum; /*!< database index */ }; +#ifdef DYING /** \ingroup dbi * A single item in an index database (i.e. the "data saved"). */ @@ -41,6 +42,7 @@ struct _dbiIR { /*@-typeuse@*/ typedef struct _dbiIR * DBIR_t; /*@=typeuse@*/ +#endif /* DYING */ /** \ingroup dbi * Items retrieved from the index database. @@ -387,11 +389,6 @@ extern "C" { */ int dbiCopen(dbiIndex dbi, /*@out@*/ DBC ** dbcp, unsigned int dbiflags) /*@modifies dbi, *dbcp @*/; -int XdbiCopen(dbiIndex dbi, /*@out@*/ DBC ** dbcp, unsigned int dbiflags, - const char *f, unsigned int l) - /*@modifies dbi, *dbcp @*/; -#define dbiCopen(_a,_b,_c) \ - XdbiCopen(_a, _b, _c, __FILE__, __LINE__) #define DBI_WRITECURSOR (1 << 0) #define DBI_ITERATOR (1 << 1) @@ -401,12 +398,7 @@ int XdbiCopen(dbiIndex dbi, /*@out@*/ DBC ** dbcp, unsigned int dbiflags, * @param flags (unused) */ int dbiCclose(dbiIndex dbi, /*@only@*/ DBC * dbcursor, unsigned int flags) - /*@modifies dbi @*/; -int XdbiCclose(dbiIndex dbi, /*@only@*/ DBC * dbcursor, unsigned int flags, - const char *f, unsigned int l) /*@modifies dbi, *dbcursor @*/; -#define dbiCclose(_a,_b,_c) \ - XdbiCclose(_a, _b, _c, __FILE__, __LINE__) /** \ingroup dbi * Delete (key,data) pair(s) from index database. |