diff options
author | jbj <devnull@localhost> | 2002-12-27 19:42:22 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-12-27 19:42:22 +0000 |
commit | 5e61b7cae81967b9bcc0700755336e5e42207b5e (patch) | |
tree | 6749f47b2964e10573b0b223a398b1d0ba9f20b0 /rpmdb | |
parent | c7975dbe480f9bb3d68e1075ba5fa967db8e3455 (diff) | |
download | librpm-tizen-5e61b7cae81967b9bcc0700755336e5e42207b5e.tar.gz librpm-tizen-5e61b7cae81967b9bcc0700755336e5e42207b5e.tar.bz2 librpm-tizen-5e61b7cae81967b9bcc0700755336e5e42207b5e.zip |
- ignore ENOENT return from db->close (#80514,#79314).
CVS patchset: 5977
CVS date: 2002/12/27 19:42:22
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/db3.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rpmdb/db3.c b/rpmdb/db3.c index 604166240..abe61daf5 100644 --- a/rpmdb/db3.c +++ b/rpmdb/db3.c @@ -734,6 +734,7 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) const char * dbfile; const char * dbsubfile; DB * db = dbi->dbi_db; + int _printit; int rc = 0, xx; flags = 0; /* XXX unused */ @@ -769,7 +770,9 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) if (db) { rc = db->close(db, 0); - rc = cvtdberr(dbi, "db->close", rc, _debug); + /* XXX ignore not found error messages. */ + _printit = (rc == ENOENT ? 0 : _debug); + rc = cvtdberr(dbi, "db->close", rc, _printit); db = dbi->dbi_db = NULL; rpmMessage(RPMMESS_DEBUG, _("closed db index %s/%s\n"), @@ -844,7 +847,9 @@ static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags) (dbfile ? dbfile : tagName(dbi->dbi_rpmtag))); xx = db->close(db, 0); - xx = cvtdberr(dbi, "db->close", xx, _debug); + /* XXX ignore not found error messages. */ + _printit = (xx == ENOENT ? 0 : _debug); + xx = cvtdberr(dbi, "db->close", xx, _printit); db = NULL; if (rc == 0 && xx) rc = xx; |