From bfb364563a358af3ed9dd14920c74cfae37d64b1 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 20 Aug 2012 11:12:05 +0300 Subject: [PATCH] Dont create %config backups on skipped files - This cosmetical only, but there's no point creating the same backup twice. Depends on commit f7f5f88f9f3d6587e747b034ccb64a3f00ff4e1e. --- lib/transaction.c | 4 ++++ tests/rpmconfig.at | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/transaction.c b/lib/transaction.c index 74ecc49..80e7e3d 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -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); diff --git a/tests/rpmconfig.at b/tests/rpmconfig.at index 15bdbf4..12728a5 100644 --- a/tests/rpmconfig.at +++ b/tests/rpmconfig.at @@ -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 -- 2.7.4