don't overwrite an existing database
CVS patchset: 495 CVS date: 1996/03/29 01:43:10
This commit is contained in:
parent
2aed2e1fa8
commit
93efd0a7b8
11
convertdb.c
11
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 */
|
||||
|
|
Loading…
Reference in New Issue