From: ewt Date: Fri, 1 Mar 1996 01:59:26 +0000 (+0000) Subject: switched the ordering in the decision process for how config files are X-Git-Tag: tznext/4.11.0.1.tizen20130304~11515 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd07a9b0577864ea9d5e659cf826830109ad7f2c;p=tools%2Flibrpm-tizen.git switched the ordering in the decision process for how config files are upgraded CVS patchset: 445 CVS date: 1996/03/01 01:59:26 --- diff --git a/lib/install.c b/lib/install.c index 3766153..db21894 100644 --- a/lib/install.c +++ b/lib/install.c @@ -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