minimal opens need to provide name index

CVS patchset: 2774
CVS date: 1999/02/04 22:04:10
This commit is contained in:
ewt 1999-02-04 22:04:10 +00:00
parent a7366495ae
commit 5409a7ad52
1 changed files with 6 additions and 6 deletions

View File

@ -192,18 +192,18 @@ int openDatabase(const char * prefix, const char * dbpath, rpmdb *rpmdbp, int mo
}
}
if (minimal) {
*rpmdbp = malloc(sizeof(struct rpmdb_s));
**rpmdbp = db;
return 0;
}
rc = openDbFile(prefix, dbpath, "nameindex.rpm", justcheck, mode,
&db.nameIndex, DB_HASH);
if (!rc)
rc = openDbFile(prefix, dbpath, "fileindex.rpm", justcheck, mode,
&db.fileIndex, DB_HASH);
if (minimal) {
*rpmdbp = malloc(sizeof(struct rpmdb_s));
**rpmdbp = db;
return 0;
}
/* We used to store the fileindexes as complete paths, rather then
plain basenames. Let's see which version we are... */
if (!justcheck && !dbiGetFirstKey(db.fileIndex, &akey)) {