need to handle conflictsindex in rpmdbMoveDatabase() and rpmdbRenameDatabase()
authorewt <devnull@localhost>
Thu, 1 May 1997 14:50:22 +0000 (14:50 +0000)
committerewt <devnull@localhost>
Thu, 1 May 1997 14:50:22 +0000 (14:50 +0000)
CVS patchset: 1571
CVS date: 1997/05/01 14:50:22

CHANGES
lib/rpmdb.c

diff --git a/CHANGES b/CHANGES
index 64ee60d..3843127 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -22,6 +22,7 @@
        - eight character user names could break -qlv
        - requirements which begin with a leading / require files (in
          the database!) instead of packages
+       - clean up conflictsindex during --rebuilddb
 
 2.3.10 -> 2.3.11:
        - fixed newlines in --scripts output
index 264a84c..f67627b 100644 (file)
@@ -611,6 +611,9 @@ void rpmdbRemoveDatabase(char * rootdir, char * dbpath) {
 
     sprintf(filename, "%s/%s/providesindex.rpm", rootdir, dbpath);
     unlink(filename);
+
+    sprintf(filename, "%s/%s/conflictsindex.rpm", rootdir, dbpath);
+    unlink(filename);
 }
 
 int rpmdbMoveDatabase(char * rootdir, char * olddbpath, char * newdbpath) {
@@ -663,5 +666,9 @@ int rpmdbMoveDatabase(char * rootdir, char * olddbpath, char * newdbpath) {
     sprintf(nfilename, "%s/%s/providesindex.rpm", rootdir, newdbpath);
     if (rename(ofilename, nfilename)) rc = 1;
 
+    sprintf(ofilename, "%s/%s/conflictsindex.rpm", rootdir, olddbpath);
+    sprintf(nfilename, "%s/%s/conflictsindex.rpm", rootdir, newdbpath);
+    if (rename(ofilename, nfilename)) rc = 1;
+
     return rc;
 }