summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorElena Reshetova <elena.reshetova@intel.com>2012-10-17 14:55:39 +0300
committerAnas Nashif <anas.nashif@intel.com>2013-02-02 16:44:44 -0800
commitdca7f1cdfdcdee92e0c4e835e40472f59660d2b4 (patch)
tree335d8b961ea7b755ea148e8458f1be7a542f6a8e /plugins
parente5571e11ba2a08eda4c0d3917511d36eab9e2777 (diff)
downloadlibrpm-tizen-dca7f1cdfdcdee92e0c4e835e40472f59660d2b4.tar.gz
librpm-tizen-dca7f1cdfdcdee92e0c4e835e40472f59660d2b4.tar.bz2
librpm-tizen-dca7f1cdfdcdee92e0c4e835e40472f59660d2b4.zip
Extending rpm plugin interface, part 1
This change adds a new type of the rpm plugin, called transaction plugin and a set of initial hooks for this plugin. The hooks are: PLUGINHOOK_TSM_PRE Pre-transaction hook that is called before an rpm transaction begins PLUGINHOOK_TSM_POST Post-transaction hook that is called after an rpm transaction ends PLUGINHOOK_PSM_PRE Pre-transaction-element hook that is called before an rpm transaction-element is processed PLUGINHOOK_PSM_POST Post-transaction-element hook that is called after an rpm transaction-element is processed PLUGINHOOK_SCRIPT_SETUP Per-script hook that is called once for each rpm mainainers script that is present in the package Each hook is called for every plugin that have this hook registered. The avaliable transaction plugins can be specified in macros.in via transaction_plugins element. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/plugin.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/plugin.h b/plugins/plugin.h
index 5156f93c2..cf49f8a97 100644
--- a/plugins/plugin.h
+++ b/plugins/plugin.h
@@ -7,9 +7,23 @@
#include "lib/rpmplugins.h"
#include "lib/rpmchroot.h"
+/* general plugin hooks */
rpmRC PLUGINHOOK_INIT_FUNC(rpmts ts, const char * name, const char * opts);
rpmRC PLUGINHOOK_CLEANUP_FUNC(void);
+
+/* collection plugin hooks */
rpmRC PLUGINHOOK_OPENTE_FUNC(rpmte te);
rpmRC PLUGINHOOK_COLL_POST_ANY_FUNC(void);
rpmRC PLUGINHOOK_COLL_POST_ADD_FUNC(void);
rpmRC PLUGINHOOK_COLL_PRE_REMOVE_FUNC(void);
+
+/* per transaction plugin hooks */
+rpmRC PLUGINHOOK_TSM_PRE_FUNC(rpmts ts);
+rpmRC PLUGINHOOK_TSM_POST_FUNC(rpmts ts);
+
+/* per transaction element plugin hooks */
+rpmRC PLUGINHOOK_PSM_PRE_FUNC(rpmte te);
+rpmRC PLUGINHOOK_PSM_POST_FUNC(rpmte te);
+
+/*per script plugin hooks */
+rpmRC PLUGINHOOK_SCRIPT_SETUP_FUNC(char* path);