Dont create %config backups on skipped files
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 20 Aug 2012 08:12:05 +0000 (11:12 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 20 Aug 2012 08:12:05 +0000 (11:12 +0300)
- This cosmetical only, but there's no point creating the same backup
  twice. Depends on commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e.

lib/transaction.c
tests/rpmconfig.at

index 74ecc49..80e7e3d 100644 (file)
@@ -508,6 +508,10 @@ assert(otherFi != NULL);
                }
            }
 
+           /* Skipped files dont need fixup size or backups, %config or not */
+           if (XFA_SKIPPING(rpmfsGetAction(fs, i)))
+               break;
+
            /* Try to get the disk accounting correct even if a conflict. */
            fixupSize = rpmfiFSizeIndex(otherFi, otherFileNum);
 
index 15bdbf4..12728a5 100644 (file)
@@ -542,7 +542,6 @@ AT_CLEANUP
 # Shared config(noreplace) variants of the more interesting cases
 # ------------------------------
 # Upgrade package with locally modified config file, changed in pkg.
-# Creating *two* backups makes no sense, but that's what currently happens.
 AT_SETUP([upgrade changing, modified shared config(noreplace) 1])
 AT_KEYWORDS([install])
 AT_CHECK([
@@ -581,8 +580,7 @@ otherstuff
 otherstuff
 foo-2.0
 ],
-[warning: /etc/my.conf created as /etc/my.conf.rpmnew
-warning: /etc/my.conf created as /etc/my.conf.rpmnew]
+[warning: /etc/my.conf created as /etc/my.conf.rpmnew]
 )
 AT_CLEANUP