char * rpmio_flags;
char * failedFile;
int scriptTag; /*!< Scriptlet data tag. */
- int progTag; /*!< Scriptlet interpreter tag. */
int npkgs_installed; /*!< No. of installed instances. */
int scriptArg; /*!< Scriptlet package arg. */
rpmsenseFlags sense; /*!< One of RPMSENSE_TRIGGER{PREIN,IN,UN,POSTUN}. */
return NULL;
}
-rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag)
+rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag)
{
assert(psm != NULL);
psm->scriptTag = scriptTag;
- psm->progTag = progTag;
if (scriptTag == RPMTAG_VERIFYSCRIPT) {
psm->stepName = "verify";
}
if (psm->goal == PSM_PKGINSTALL) {
psm->scriptTag = RPMTAG_PREIN;
- psm->progTag = RPMTAG_PREINPROG;
psm->sense = RPMSENSE_TRIGGERPREIN;
psm->countCorrection = 0; /* XXX is this correct?!? */
if (psm->goal == PSM_PKGERASE) {
psm->scriptTag = RPMTAG_PREUN;
- psm->progTag = RPMTAG_PREUNPROG;
psm->sense = RPMSENSE_TRIGGERUN;
psm->countCorrection = -1;
if (rc) break;
psm->scriptTag = RPMTAG_POSTIN;
- psm->progTag = RPMTAG_POSTINPROG;
psm->sense = RPMSENSE_TRIGGERIN;
psm->countCorrection = 0;
if (psm->goal == PSM_PKGERASE) {
psm->scriptTag = RPMTAG_POSTUN;
- psm->progTag = RPMTAG_POSTUNPROG;
psm->sense = RPMSENSE_TRIGGERPOSTUN;
psm->countCorrection = -1;
#define rpmpsmUNSAFE rpmpsmSTAGE
/**
- * Run rpmpsmStage(PSM_SCRIPT) for scriptTag and progTag
+ * Run rpmpsmStage(PSM_SCRIPT) for scriptTag
* @param psm package state machine data
* @param scriptTag scriptlet tag to execute
- * @param progTag scriptlet prog tag to execute
* @return 0 on success
*/
RPM_GNUC_INTERNAL
-rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag);
+rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag);
#ifdef __cplusplus
}
rpmtsi pi;
rpmte p;
rpmpsm psm;
- rpmTag progtag = RPMTAG_NOT_FOUND;
int xx;
- if (stag == RPMTAG_PRETRANS) {
- progtag = RPMTAG_PRETRANSPROG;
- } else if (stag == RPMTAG_POSTTRANS) {
- progtag = RPMTAG_POSTTRANSPROG;
- } else {
+ if (stag != RPMTAG_PRETRANS && stag != RPMTAG_POSTTRANS)
return -1;
- }
pi = rpmtsiInit(ts);
while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
if (rpmteOpen(p, ts, 0)) {
psm = rpmpsmNew(ts, p);
- xx = rpmpsmScriptStage(psm, stag, progtag);
+ xx = rpmpsmScriptStage(psm, stag);
psm = rpmpsmFree(psm);
rpmteClose(p, ts, 0);
}
/* create psm to run the script */
psm = rpmpsmNew(ts, te);
- rpmpsmScriptStage(psm, RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG);
+ rpmpsmScriptStage(psm, RPMTAG_VERIFYSCRIPT);
rc = rpmpsmStage(psm, PSM_SCRIPT);
psm = rpmpsmFree(psm);