summaryrefslogtreecommitdiff
path: root/lib/rpmte.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-03-20 16:32:54 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-03-20 16:32:54 +0200
commit274dbf557d1cac90f7c278f9b6d6af05997d92df (patch)
tree07b79f7fc01b58c14a9c28770edbc2ed9b2f40db /lib/rpmte.c
parent72b6a384f57402e1faf0cceb38c55f5e125fdabf (diff)
downloadrpm-274dbf557d1cac90f7c278f9b6d6af05997d92df.tar.gz
rpm-274dbf557d1cac90f7c278f9b6d6af05997d92df.tar.bz2
rpm-274dbf557d1cac90f7c278f9b6d6af05997d92df.zip
Don't free up file info sets on transaction test-runs, take II
- Despite commit cef18c94807af0935b7796c462aab8ed39f0f376, we'd still end up freeing the file info sets via rpmteClose() while going through the test-transaction packages. This together with commit 06a2f1269b035a3a76464149834f2a5a8c4e89f2 caused install failures on packages which have %pretrans scriptlets, if a test-transaction was first performed on the same transaction set that gets used for the "real" transaction as well. How wonderfully obscure...
Diffstat (limited to 'lib/rpmte.c')
-rw-r--r--lib/rpmte.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rpmte.c b/lib/rpmte.c
index d1e4f8778..65e1e766b 100644
--- a/lib/rpmte.c
+++ b/lib/rpmte.c
@@ -917,7 +917,8 @@ int rpmteProcess(rpmte te, pkgGoal goal)
{
/* Only install/erase resets pkg file info */
int scriptstage = (goal != PKG_INSTALL && goal != PKG_ERASE);
- int reset_fi = (scriptstage == 0);
+ int test = (rpmtsFlags(te->ts) & RPMTRANS_FLAG_TEST);
+ int reset_fi = (scriptstage == 0 && test == 0);
int failed = 1;
/* Dont bother opening for elements without pre/posttrans scripts */