switched the ordering in the decision process for how config files are

upgraded

CVS patchset: 445
CVS date: 1996/03/01 01:59:26
This commit is contained in:
ewt 1996-03-01 01:59:26 +00:00
parent c0dae8e3cf
commit cd07a9b057
1 changed files with 8 additions and 5 deletions

View File

@ -880,11 +880,8 @@ enum instActions decideFileFate(char * filespec, short dbMode, char * dbMd5,
newAttr = newLink;
}
if (!strcmp(dbAttr, newAttr)) {
/* this file is the same in all versions of this package */
message(MESS_DEBUG, " old == new, keeping\n");
return KEEP;
}
/* this order matters - we'd prefer to CREATE the file is at all
possible in case something else (like the timestamp) has changed */
if (!strcmp(dbAttr, buffer)) {
/* this config file has never been modified, so
@ -894,6 +891,12 @@ enum instActions decideFileFate(char * filespec, short dbMode, char * dbMd5,
return CREATE;
}
if (!strcmp(dbAttr, newAttr)) {
/* this file is the same in all versions of this package */
message(MESS_DEBUG, " old == new, keeping\n");
return KEEP;
}
/* the config file on the disk has been modified, but
the ones in the two packages are different. It would
be nice if RPM was smart enough to at least try and