summaryrefslogtreecommitdiff
path: root/lib/rpmts_internal.h
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2013-04-03 16:49:50 +0300
committerPanu Matilainen <pmatilai@redhat.com>2013-04-03 16:53:12 +0300
commit51b306686c46dfa67f6f9d16f0190c99f55339dd (patch)
treeaa246850a509bef89611d75921d79dc0ad55fa9a /lib/rpmts_internal.h
parent3420601fb5bb03ff80c2455579cc9ae0712f2306 (diff)
downloadrpm-51b306686c46dfa67f6f9d16f0190c99f55339dd.tar.gz
Initialize plugins much earlier
- Lazily initialize plugins when adding install or erase elements to the transaction already. Since this ensures the setup will always be performed, there's no need to do this from rpmtsRun() anymore, empty transaction would not get that far anyway. - This will allow adding hooks to the places where package header is still available (which is required for various things) and in general, before transaction is actually executed. - The downside here is that adding or removing packages to a transaction can now fail due to plugin initialization failure where its not easily distinguishable from other errors, but then they can also fail due to rpmdb open failure which kinda similar "shouldn't be here" issue. The alternative would be initializing the plugins in rpmtsCreate() but as that's not actually permitted to fail at all, its not an option really.
Diffstat (limited to 'lib/rpmts_internal.h')
-rw-r--r--lib/rpmts_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h
index 91818afe5..812a93886 100644
--- a/lib/rpmts_internal.h
+++ b/lib/rpmts_internal.h
@@ -92,6 +92,8 @@ rpmal rpmtsCreateAl(rpmts ts, rpmElementTypes types);
RPM_GNUC_INTERNAL
int rpmtsSolve(rpmts ts, rpmds key);
+RPM_GNUC_INTERNAL
+rpmRC rpmtsSetupTransactionPlugins(rpmts ts);
#ifdef __cplusplus
}
#endif