diff options
author | root <devnull@localhost> | 1996-03-29 01:43:10 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-03-29 01:43:10 +0000 |
commit | 93efd0a7b8ffc48adafc9ba25e7cee42a8bef153 (patch) | |
tree | 1197547af4e83e77913650859ed1e7df543720c4 | |
parent | 2aed2e1fa84cd6fab776af73a56b4fc3ae00bb34 (diff) | |
download | rpm-93efd0a7b8ffc48adafc9ba25e7cee42a8bef153.tar.gz rpm-93efd0a7b8ffc48adafc9ba25e7cee42a8bef153.tar.bz2 rpm-93efd0a7b8ffc48adafc9ba25e7cee42a8bef153.zip |
don't overwrite an existing database
CVS patchset: 495
CVS date: 1996/03/29 01:43:10
-rw-r--r-- | convertdb.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/convertdb.c b/convertdb.c index 956655a81..c498dfefb 100644 --- a/convertdb.c +++ b/convertdb.c @@ -38,17 +38,14 @@ int convertDB(void) { char * preun, * postun; int i, j; - if (oldrpmdbOpen(&olddb)) { - error(RPMERR_OLDDBMISSING, ""); + if (exists("/var/lib/rpm/packages.rpm")) { + error(RPMERR_NOCREATEDB, "RPM database already exists"); return 0; } - if (exists("/var/lib/rpm/packages.rpm")) { -#if 0 - error(RPMERR_NOCREATEDB, "RPM database already exists"); + if (oldrpmdbOpen(&olddb)) { + error(RPMERR_OLDDBMISSING, ""); return 0; -#endif - unlink("/var/lib/rpm/packages.rpm"); } /* if any of the indexes exist, get rid of them */ |