switched the ordering in the decision process for how config files are
authorewt <devnull@localhost>
Fri, 1 Mar 1996 01:59:26 +0000 (01:59 +0000)
committerewt <devnull@localhost>
Fri, 1 Mar 1996 01:59:26 +0000 (01:59 +0000)
upgraded

CVS patchset: 445
CVS date: 1996/03/01 01:59:26

lib/install.c

index 3766153..db21894 100644 (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