diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-02-25 10:58:51 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-02-25 10:58:51 +0200 |
commit | 98fcb7566d16f248459d30f72f34b9c1e79f0b09 (patch) | |
tree | e2242a053e11345b1d6443c514ec061777e346ad /lib/rpmscript.h | |
parent | fde84f901cd0b58e4313949bbfae4e6c35dacbbd (diff) | |
download | librpm-tizen-98fcb7566d16f248459d30f72f34b9c1e79f0b09.tar.gz librpm-tizen-98fcb7566d16f248459d30f72f34b9c1e79f0b09.tar.bz2 librpm-tizen-98fcb7566d16f248459d30f72f34b9c1e79f0b09.zip |
First rough-cut version of scriptlet abstraction
- Split the low-level scriptlet machinery out of psm
- New struct to hold the necessary information about scriptlets so
we can execute them without having a header at hand.
- Trigger handling is hackish and needs more love...
Diffstat (limited to 'lib/rpmscript.h')
-rw-r--r-- | lib/rpmscript.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/rpmscript.h b/lib/rpmscript.h new file mode 100644 index 000000000..8df2cc362 --- /dev/null +++ b/lib/rpmscript.h @@ -0,0 +1,26 @@ +#ifndef _RPMSCRIPT_H +#define _RPMSCRIPT_H + +#include <rpm/rpmtypes.h> +#include <rpm/argv.h> + +typedef struct rpmScript_s * rpmScript; + +struct rpmScript_s { + rpmTag tag; /* script tag */ + char **args; /* scriptlet call arguments */ + char *body; /* script body */ + char *descr; /* description for logging */ +}; + +RPM_GNUC_INTERNAL +rpmScript rpmScriptFromTag(Header h, rpmTag scriptTag); + +RPM_GNUC_INTERNAL +rpmScript rpmScriptFree(rpmScript script); + +RPM_GNUC_INTERNAL +rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, + rpmts ts, ARGV_const_t prefixes, int warn_only); + +#endif /* _RPMSCRIPT_H */ |