1) never removed files which are state RPMFILE_STATE_NOTINSTALLED

CVS patchset: 1129
CVS date: 1996/10/21 02:19:37
This commit is contained in:
ewt 1996-10-21 02:19:37 +00:00
parent 6d61fa694c
commit 947a93a597
1 changed files with 7 additions and 1 deletions

View File

@ -165,6 +165,11 @@ static int handleSharedFiles(rpmdb db, int offset, char ** fileList,
message(MESS_DEBUG, " file was never installed\n");
break;
case RPMFILE_STATE_NETSHARED:
message(MESS_DEBUG, " file is netshared (so don't touch it)\n");
fileActions[sharedList[i].mainFileNumber] = KEEP;
break;
case RPMFILE_STATE_NORMAL:
if (!strcmp(fileMd5List[sharedList[i].mainFileNumber],
secFileMd5List[sharedList[i].secFileNumber])) {
@ -251,7 +256,8 @@ int rpmRemovePackage(char * prefix, rpmdb db, unsigned int offset, int flags) {
fileActions = alloca(sizeof(*fileActions) * fileCount);
for (i = 0; i < fileCount; i++)
if (fileStatesList[i] == RPMFILE_STATE_NOTINSTALLED)
if (fileStatesList[i] == RPMFILE_STATE_NOTINSTALLED ||
fileStatesList[i] == RPMFILE_STATE_NETSHARED)
fileActions[i] = KEEP;
else
fileActions[i] = REMOVE;