Fix: handle %config(noreplace) correctly for linuxconf.
authorjbj <devnull@localhost>
Thu, 15 Apr 1999 06:14:34 +0000 (06:14 +0000)
committerjbj <devnull@localhost>
Thu, 15 Apr 1999 06:14:34 +0000 (06:14 +0000)
CVS patchset: 2999
CVS date: 1999/04/15 06:14:34

lib/transaction.c

index 6f0381a..3c7a7a1 100644 (file)
@@ -1138,10 +1138,12 @@ void handleOverlappedFiles(struct fileInfo * fi, hashTable ht,
        if (fi->type == TR_ADDED && otherPkgNum < 0) {
            if (fi->actions[i] == FA_UNKNOWN) {
                if ((fi->fflags[i] & RPMFILE_CONFIG) && 
-                           !lstat(fi->fl[i], &sb))
-                   fi->actions[i] = FA_BACKUP;
-               else
+                           !lstat(fi->fl[i], &sb)) {
+                   fi->actions[i] = (fi->flags[i] & RPMFILE_NOREPLACE)
+                       ? FA_ALTNAME : FA_BACKUP;
+               } else {
                    fi->actions[i] = FA_CREATE;
+               }
            }
        } else if (fi->type == TR_ADDED) {
            if (probs && filecmp(recs[otherPkgNum]->fmodes[otherFileNum],