rpm  4.5
Macros | Functions | Variables
psm.c File Reference

Package state machine to handle a package from a transaction set. More...

#include "system.h"
#include <rpmio_internal.h>
#include <header_internal.h>
#include <rpmlib.h>
#include <rpmmacro.h>
#include <rpmurl.h>
#include <rpmlua.h>
#include "cpio.h"
#include "fsm.h"
#include "psm.h"
#include "rpmds.h"
#include "rpmfi.h"
#include "rpmte.h"
#include "rpmts.h"
#include "rpmlead.h"
#include "signature.h"
#include "legacy.h"
#include "misc.h"
#include "rpmdb.h"
#include "debug.h"
Include dependency graph for psm.c:

Go to the source code of this file.

Macros

#define _RPMEVR_INTERNAL
 
#define _RPMFI_INTERNAL
 
#define _RPMTE_INTERNAL
 
#define _RPMTS_INTERNAL   /* XXX ts->notify */
 
#define _PSM_DEBUG   0
 

Functions

int rpmVersionCompare (Header first, Header second)
 Compare headers to determine which header is "newer".
 
static rpmRC markReplacedFiles (const rpmpsm psm)
 Mark files in database shared with this package as "replaced".
 
rpmRC rpmInstallSourcePackage (rpmts ts, FD_t fd, const char **specFilePtr, const char **cookie)
 Install source package.
 
static const char * tag2sln (int tag)
 Return scriptlet name from tag.
 
static rpmScriptID tag2slx (int tag)
 Return scriptlet id from tag.
 
static pid_t psmWait (rpmpsm psm)
 Wait for child process to be reaped.
 
static rpmRC runScript (rpmpsm psm, Header h, const char *sln, int progArgc, const char **progArgv, const char *script, int arg1, int arg2)
 Run scriptlet with args.
 
static rpmRC runInstScript (rpmpsm psm)
 Retrieve and run scriptlet from header.
 
static rpmRC handleOneTrigger (const rpmpsm psm, Header sourceH, Header triggeredH, int arg2, unsigned char *triggersAlreadyRun)
 Execute triggers.
 
static rpmRC runTriggers (rpmpsm psm)
 Run trigger scripts in the database that are fired by this header.
 
static rpmRC runImmedTriggers (rpmpsm psm)
 Run triggers from this header that are fired by headers in the database.
 
static const char * pkgStageString (pkgStage a)
 
rpmpsm XrpmpsmUnlink (rpmpsm psm, const char *msg, const char *fn, unsigned ln)
 
rpmpsm XrpmpsmLink (rpmpsm psm, const char *msg, const char *fn, unsigned ln)
 
rpmpsm rpmpsmFree (rpmpsm psm)
 Destroy a package state machine.
 
rpmpsm rpmpsmNew (rpmts ts, rpmte te, rpmfi fi)
 Create and load a package state machine.
 
static uint_32 hLoadTID (Header h, int_32 tag)
 Load a transaction id from a header.
 
static int hCopyTag (Header sh, Header th, int_32 tag)
 Copy a tag from a source to a target header.
 
static int hSaveBlinks (Header h, const struct rpmChainLink_s *blink)
 Save backward link(s) of an upgrade chain into a header.
 
static int hSaveFlinks (Header h, const struct rpmChainLink_s *flink)
 Save forward link(s) of an upgrade chain into a header.
 
static int populateInstallHeader (const rpmts ts, const rpmte te, rpmfi fi)
 Add per-transaction data to an install header.
 
static int postPopulateInstallHeader (const rpmts ts, const rpmte te, rpmfi fi)
 Add fi->states to an install header.
 
static void * rpmpsmThread (void *arg)
 
static int rpmpsmNext (rpmpsm psm, pkgStage nstage)
 
static void replace_lzma_with_gzip (Header h)
 
rpmRC rpmpsmStage (rpmpsm psm, pkgStage stage)
 Package state machine driver.
 

Variables

int _psm_debug = 0
 
int _psm_threads = 0
 
static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"
 
static int ldconfig_done = 0
 
static const char * ldconfig_path = "/sbin/ldconfig"
 

Detailed Description

Package state machine to handle a package from a transaction set.

Definition in file psm.c.

Macro Definition Documentation

#define _PSM_DEBUG   0

Definition at line 38 of file psm.c.

#define _RPMEVR_INTERNAL

Definition at line 19 of file psm.c.

#define _RPMFI_INTERNAL

Definition at line 22 of file psm.c.

#define _RPMTE_INTERNAL

Definition at line 25 of file psm.c.

#define _RPMTS_INTERNAL   /* XXX ts->notify */

Definition at line 28 of file psm.c.

Function Documentation

static rpmRC handleOneTrigger ( const rpmpsm  psm,
Header  sourceH,
Header  triggeredH,
int  arg2,
unsigned char *  triggersAlreadyRun 
)
static

Execute triggers.

Todo:
Trigger on any provides, not just package NVR.
Parameters
psmpackage state machine data
sourceH
triggeredH
arg2
triggersAlreadyRun
Returns

Definition at line 1029 of file psm.c.

References rpmpsm_s::countCorrection, rpmpsm_s::fi, headerFreeData(), headerNVR(), rpmpsm_s::rc, rpmdbCountPackages(), rpmdsAnyMatchesDep(), rpmdsFlags(), rpmdsFree(), rpmdsInit(), rpmdsN(), rpmdsNew(), rpmdsNext(), rpmdsSetNoPromote(), RPMRC_FAIL, RPMRC_OK, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, rpmtsGetRdb(), runScript(), rpmpsm_s::sense, and rpmpsm_s::ts.

Referenced by runImmedTriggers(), and runTriggers().

static int hCopyTag ( Header  sh,
Header  th,
int_32  tag 
)
static

Copy a tag from a source to a target header.

Parameters
shsource header
thtarget header
tagtag to copy
Returns
0 always

Definition at line 1376 of file psm.c.

References headerAddEntry(), headerFreeData(), and headerGetEntry().

Referenced by rpmpsmStage().

static uint_32 hLoadTID ( Header  h,
int_32  tag 
)
static

Load a transaction id from a header.

Parameters
hheader
tagtag to load
Returns
tag value (0 on failure)

Definition at line 1354 of file psm.c.

References headerFreeData(), headerGetEntry(), and RPM_INT32_TYPE.

Referenced by rpmpsmStage().

static int hSaveBlinks ( Header  h,
const struct rpmChainLink_s *  blink 
)
static

Save backward link(s) of an upgrade chain into a header.

Parameters
hheader
*blinkbackward links
Returns
0 always

< End of chain marker.

Definition at line 1397 of file psm.c.

References argvCount(), argvData(), headerAddEntry(), RPM_STRING_ARRAY_TYPE, RPMTAG_BLINKHDRID, RPMTAG_BLINKNEVRA, RPMTAG_BLINKPKGID, and RPMTE_CHAIN_END.

Referenced by populateInstallHeader().

static int hSaveFlinks ( Header  h,
const struct rpmChainLink_s *  flink 
)
static

Save forward link(s) of an upgrade chain into a header.

Parameters
hheader
*flinkforward links
Returns
0 always

Definition at line 1441 of file psm.c.

References argvCount(), argvData(), headerAddEntry(), RPM_STRING_ARRAY_TYPE, RPMTAG_FLINKHDRID, RPMTAG_FLINKNEVRA, RPMTAG_FLINKPKGID, and RPMTE_CHAIN_END.

Referenced by rpmpsmStage().

static rpmRC markReplacedFiles ( const rpmpsm  psm)
static

Mark files in database shared with this package as "replaced".

Parameters
psmpackage state machine data
Returns
0 always

Definition at line 91 of file psm.c.

References alloca(), rpmpsm_s::fi, rpmdbAppendIterator(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_PACKAGES, rpmdbNextIterator(), rpmdbSetIteratorModified(), rpmdbSetIteratorRewrite(), rpmfiFC(), RPMFILE_STATE_REPLACED, RPMRC_OK, RPMTAG_FILESTATES, rpmtsInitIterator(), and rpmpsm_s::ts.

Referenced by rpmpsmStage().

static const char* pkgStageString ( pkgStage  a)
static
static int populateInstallHeader ( const rpmts  ts,
const rpmte  te,
rpmfi  fi 
)
static

Add per-transaction data to an install header.

Parameters
tstransaction set
tetransaction element
fifile info set
Returns
0 always

Definition at line 1495 of file psm.c.

References headerAddEntry(), headerGetOrigin(), hSaveBlinks(), RPM_INT32_TYPE, RPM_STRING_TYPE, rpmfiFC(), RPMTAG_INSTALLCOLOR, RPMTAG_INSTALLTIME, RPMTAG_PACKAGECOLOR, RPMTAG_PACKAGEORIGIN, rpmteColor(), RPMTRANS_TYPE_ROLLBACK, rpmtsColor(), and rpmtsType().

Referenced by rpmpsmStage().

static int postPopulateInstallHeader ( const rpmts  ts,
const rpmte  te,
rpmfi  fi 
)
static

Add fi->states to an install header.

Parameters
tstransaction set
tetransaction element
fifile info set
Returns
0 always

Definition at line 1543 of file psm.c.

References alloca(), headerAddEntry(), RPM_CHAR_TYPE, rpmfiFC(), and RPMTAG_FILESTATES.

Referenced by rpmpsmStage().

static pid_t psmWait ( rpmpsm  psm)
static

Wait for child process to be reaped.

Parameters
psmpackage state machine data
Returns

Definition at line 434 of file psm.c.

References rpmsqElem::child, D_, rpmsqElem::op, rpmsqElem::reaped, RPMMESS_DEBUG, rpmMessage, RPMSCRIPT_STATE_REAPED, rpmsqWait(), rpmswAdd(), RPMTS_OP_SCRIPTLETS, rpmtsOp(), rpmpsm_s::scriptTag, rpmpsm_s::sq, rpmpsm_s::sstates, rpmsqElem::status, rpmpsm_s::stepName, tag2slx(), rpmpsm_s::ts, and rpmop_s::usecs.

Referenced by runScript().

static void replace_lzma_with_gzip ( Header  h)
static
rpmRC rpmInstallSourcePackage ( rpmts  ts,
FD_t  fd,
const char **  specFilePtr,
const char **  cookie 
)
rpmpsm rpmpsmFree ( rpmpsm  psm)

Destroy a package state machine.

Parameters
psmpackage state machine
Returns
NULL always

Definition at line 1293 of file psm.c.

References _free(), rpmpsm_s::fi, rpmpsm_s::nrefs, rpmfiFree(), rpmpsmUnlink(), rpmteFree(), rpmtsFree(), rpmpsm_s::sstates, rpmpsm_s::te, and rpmpsm_s::ts.

Referenced by _processFailedPackage(), rpmtsRun(), and rpmVerifyScript().

rpmpsm rpmpsmNew ( rpmts  ts,
rpmte  te,
rpmfi  fi 
)

Create and load a package state machine.

Parameters
tstransaction set
tetransaction set element
fifile info set
Returns
new package state machine

Definition at line 1328 of file psm.c.

References rpmpsm_s::fi, rpmfiLink(), rpmpsmLink(), RPMSCRIPT_MAX, rpmtsLink(), rpmpsm_s::sstates, rpmpsm_s::te, rpmpsm_s::ts, and xcalloc().

Referenced by _processFailedPackage(), rpmtsRun(), and rpmVerifyScript().

static int rpmpsmNext ( rpmpsm  psm,
pkgStage  nstage 
)
static

Definition at line 1567 of file psm.c.

References _psm_threads, rpmpsm_s::nstage, rpmpsmStage(), rpmpsmThread(), rpmsqJoin(), and rpmsqThread().

Referenced by rpmpsmStage().

rpmRC rpmpsmStage ( rpmpsm  psm,
pkgStage  stage 
)

Package state machine driver.

Todo:
Packages w/o files never get a callback, hence don't get displayed on install with -v.

Definition at line 1595 of file psm.c.

References _, _free(), rpmpsm_s::amount, rpmlead::archnum, rpmpsm_s::cfd, Chdir(), Chroot(), rpmpsm_s::chrootDone, rpmpsm_s::countCorrection, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, CPIO_SBIT_CHECK, cpioStrerror(), D_, dbiOpen(), errno, FA_COPYOUT, rpmpsm_s::failedFile, Fclose(), rpmpsm_s::fd, fdDup(), Fdopen(), FDSTAT_DIGEST, fdstat_op(), FDSTAT_READ, FDSTAT_WRITE, Ferror(), Fflush(), rpmpsm_s::fi, Fileno(), Fopen(), FSM_PKGBUILD, FSM_PKGCOMMIT, FSM_PKGERASE, FSM_PKGINSTALL, fsmSetup(), fsmTeardown(), Fstrerror(), rpmpsm_s::goal, hCopyTag(), HEADER_MAGIC_YES, headerCheck(), headerCopyLoad(), headerFree(), headerFreeData(), headerFreeIterator(), headerGetEntry(), headerGetInstance(), headerInitIterator(), headerIsEntry(), headerLink(), headerNew(), headerNextIterator(), headerRegenSigHeader(), headerReload(), headerSetInstance(), headerSprintf(), headerWrite(), hLoadTID(), hSaveFlinks(), rpmlead::major, markReplacedFiles(), rpmpsm_s::mi, rpmlead::minor, rpmlead::name, rpmpsm_s::npkgs_installed, rpmpsm_s::oh, rpmlead::osnum, rpmpsm_s::payload_format, rpmpsm_s::pkgfn, pkgStageString(), rpmpsm_s::pkgURL, populateInstallHeader(), postPopulateInstallHeader(), rpmpsm_s::progTag, PSM_CHROOT_IN, PSM_CHROOT_OUT, PSM_COMMIT, PSM_CREATE, PSM_DESTROY, PSM_FINI, PSM_IMMED_TRIGGERS, PSM_INIT, PSM_NOTIFY, PSM_PKGCOMMIT, PSM_PKGERASE, PSM_PKGINSTALL, PSM_PKGSAVE, PSM_POST, PSM_PRE, PSM_PROCESS, PSM_RPMDB_ADD, PSM_RPMDB_LOAD, PSM_RPMDB_REMOVE, PSM_RPMIO_FLAGS, PSM_SCRIPT, PSM_TRIGGERS, PSM_UNDO, PSM_UNKNOWN, rpmpsm_s::rc, replace_lzma_with_gzip(), RPM_INT32_TYPE, RPM_STRING_TYPE, RPMCALLBACK_CPIO_ERROR, RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_INST_START, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP, RPMCALLBACK_UNPACK_ERROR, rpmdbAdd(), rpmdbCountPackages(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_PACKAGES, rpmdbNextIterator(), rpmdbRemove(), rpmdbSetIteratorRE(), RPMERR_CPIO, RPMERR_NOSPACE, RPMERR_SCRIPT, rpmError, rpmfiBuildFNames(), rpmfiFC(), RPMFILE_STATE_NORMAL, rpmFreeSignature(), rpmGenPath(), rpmGetPath(), rpmHeaderFormats, rpmpsm_s::rpmio_flags, RPMLEAD_BINARY, RPMMESS_DEBUG, RPMMESS_VERBOSE, rpmMessage, rpmMkdirPath(), rpmpsmNext(), RPMRC_FAIL, RPMRC_OK, RPMSIGTYPE_HEADERSIG, rpmswAdd(), rpmswEnter(), rpmswExit(), RPMTAG_ARCH, RPMTAG_ARCHIVESIZE, RPMTAG_BASENAMES, RPMTAG_BLINKHDRID, RPMTAG_BLINKNEVRA, RPMTAG_BLINKPKGID, RPMTAG_DEFAULTPREFIX, RPMTAG_EPOCH, RPMTAG_FILEGROUPNAME, RPMTAG_FILEUSERNAME, RPMTAG_HEADERIMAGE, RPMTAG_HEADERIMMUTABLE, RPMTAG_HEADERSIGNATURES, RPMTAG_INSTALLTID, RPMTAG_NAME, RPMTAG_ORIGBASENAMES, RPMTAG_OS, RPMTAG_PACKAGEORIGIN, RPMTAG_PAYLOADCOMPRESSOR, RPMTAG_PAYLOADFORMAT, RPMTAG_POSTIN, RPMTAG_POSTINPROG, RPMTAG_POSTUN, RPMTAG_POSTUNPROG, RPMTAG_PREIN, RPMTAG_PREINPROG, RPMTAG_PREUN, RPMTAG_PREUNPROG, RPMTAG_RELEASE, RPMTAG_REMOVETID, RPMTAG_SHA1HEADER, RPMTAG_TRIGGERNAME, RPMTAG_VERSION, rpmTagTable, rpmteA(), rpmteE(), rpmteFd(), rpmteHdrid(), rpmteN(), rpmteNEVR(), rpmteO(), rpmteR(), rpmteSetDBInstance(), rpmteV(), RPMTRANS_FLAG_APPLYONLY, RPMTRANS_FLAG_JUSTDB, RPMTRANS_FLAG_NOPOST, RPMTRANS_FLAG_NOPOSTUN, RPMTRANS_FLAG_NOPRE, RPMTRANS_FLAG_NOPREUN, RPMTRANS_FLAG_NOTRIGGERIN, RPMTRANS_FLAG_NOTRIGGERPOSTUN, RPMTRANS_FLAG_NOTRIGGERPREIN, RPMTRANS_FLAG_NOTRIGGERUN, RPMTRANS_FLAG_PKGCOMMIT, RPMTRANS_FLAG_TEST, RPMTRANS_TYPE_AUTOROLLBACK, RPMTRANS_TYPE_ROLLBACK, RPMTS_OP_COMPRESS, RPMTS_OP_DBADD, RPMTS_OP_DBREMOVE, RPMTS_OP_DIGEST, RPMTS_OP_UNCOMPRESS, rpmtsChrootDone(), rpmtsColor(), rpmtsCurrDir(), rpmtsFlags(), rpmtsGetRdb(), rpmtsGetTid(), rpmtsInitIterator(), rpmtsNotify(), rpmtsOp(), rpmtsRootDir(), rpmtsSetChrootDone(), rpmtsType(), rpmtsVSFlags(), RPMVSF_NOHDRCHK, rpmWriteSignature(), runImmedTriggers(), runInstScript(), runTriggers(), rpmpsm_s::scriptArg, rpmpsm_s::scriptTag, rpmpsm_s::sense, rpmlead::signature_type, snprintf(), rpmpsm_s::stepName, stpcpy(), tag2sln(), rpmpsm_s::te, rpmpsm_s::total, rpmpsm_s::ts, rpmlead::type, urlPath(), rpmpsm_s::what, writeLead(), X_OK, xmalloc(), and xstrdup().

Referenced by _processFailedPackage(), rpmInstallSourcePackage(), rpmpsmNext(), rpmpsmThread(), rpmtsRun(), and rpmVerifyScript().

static void* rpmpsmThread ( void *  arg)
static

Definition at line 1557 of file psm.c.

References rpmpsm_s::nstage, and rpmpsmStage().

Referenced by rpmpsmNext().

int rpmVersionCompare ( Header  first,
Header  second 
)

Compare headers to determine which header is "newer".

Deprecated:
Use rpmdsCompare instead.
Parameters
first1st header
second2nd header
Returns
result of comparison

Definition at line 53 of file psm.c.

References headerGetEntry(), RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, and rpmvercmp.

Referenced by hdr_compare(), and rpmInstall().

static rpmRC runImmedTriggers ( rpmpsm  psm)
static

Run triggers from this header that are fired by headers in the database.

Parameters
psmpackage state machine data
Returns
0 on success

Definition at line 1173 of file psm.c.

References alloca(), rpmpsm_s::fi, handleOneTrigger(), headerFreeData(), rpmpsm_s::mi, rpmpsm_s::rc, rpmdbFreeIterator(), rpmdbGetIteratorCount(), rpmdbNextIterator(), RPMRC_OK, RPMTAG_NAME, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, rpmtsInitIterator(), and rpmpsm_s::ts.

Referenced by rpmpsmStage().

static rpmRC runInstScript ( rpmpsm  psm)
static

Retrieve and run scriptlet from header.

Parameters
psmpackage state machine data
Returns
rpmRC return code

Definition at line 974 of file psm.c.

References _free(), alloca(), rpmpsm_s::fi, headerFreeData(), rpmpsm_s::progTag, rpmpsm_s::rc, RPM_STRING_TYPE, rpmExpand(), RPMRC_OK, runScript(), rpmpsm_s::scriptArg, rpmpsm_s::scriptTag, and tag2sln().

Referenced by rpmpsmStage().

static rpmRC runScript ( rpmpsm  psm,
Header  h,
const char *  sln,
int  progArgc,
const char **  progArgv,
const char *  script,
int  arg1,
int  arg2 
)
static

Run scriptlet with args.

Run a script with an interpreter. If the interpreter is not specified, /bin/sh will be used. If the interpreter is /bin/sh, then the args from the header will be ignored, passing instead arg1 and arg2.

Parameters
psmpackage state machine data
hheader
slnname of scriptlet section
progArgcno. of args from header
progArgvargs from header, progArgv[0] is the interpreter to use
scriptscriptlet from header
arg1no. instances of package installed after scriptlet exec (-1 is no arg)
arg2ditto, but for the target package
Returns
0 on success

Definition at line 598 of file psm.c.

References _, _free(), alloca(), Chdir(), rpmsqElem::child, Chroot(), D_, doputenv(), errno, Fclose(), rpmpsm_s::fd, fdDup(), Ferror(), rpmpsm_s::fi, Fileno(), Fopen(), Fwrite(), headerFreeData(), headerNVR(), headerSprintf(), makeTempFile(), psmWait(), rpmpsm_s::rc, rpmsqElem::reaped, rpmsqElem::reaper, rpm_execcon, RPMERR_SCRIPT, rpmError, rpmExpand(), rpmGetPath(), rpmHeaderFormats, rpmIsDebug, rpmIsVerbose, RPMMESS_DEBUG, rpmMessage, RPMRC_FAIL, RPMRC_OK, RPMSCRIPT_STATE_EXEC, RPMSCRIPT_STATE_SELINUX, RPMSCRIPT_STATE_UNKNOWN, rpmsqFork(), RPMTAG_ARCH, RPMTAG_INSTALLPREFIX, RPMTAG_INSTPREFIXES, rpmTagTable, rpmtsChrootDone(), rpmtsRootDir(), rpmtsScriptFd(), rpmtsSELinuxEnabled(), SCRIPT_PATH, rpmpsm_s::scriptTag, rpmpsm_s::sq, rpmpsm_s::sstates, rpmsqElem::status, rpmpsm_s::stepName, stpcpy(), tag2sln(), tag2slx(), rpmpsm_s::ts, rpmpsm_s::unorderedSuccessor, unsetenv(), URL_IS_DASH, URL_IS_FTP, URL_IS_HKP, URL_IS_HTTP, URL_IS_HTTPS, URL_IS_PATH, URL_IS_UNKNOWN, and urlIsURL().

Referenced by handleOneTrigger(), and runInstScript().

static rpmRC runTriggers ( rpmpsm  psm)
static

Run trigger scripts in the database that are fired by this header.

Parameters
psmpackage state machine data
Returns
0 on success

Definition at line 1131 of file psm.c.

References rpmpsm_s::countCorrection, rpmpsm_s::fi, handleOneTrigger(), rpmpsm_s::mi, rpmpsm_s::rc, rpmdbCountPackages(), rpmdbFreeIterator(), rpmdbNextIterator(), RPMRC_NOTFOUND, RPMRC_OK, RPMTAG_TRIGGERNAME, rpmteN(), rpmtsGetRdb(), rpmtsInitIterator(), rpmpsm_s::te, and rpmpsm_s::ts.

Referenced by rpmpsmStage().

static const char* tag2sln ( int  tag)
static

Return scriptlet name from tag.

Parameters
tagscriptlet tag
Returns
name of scriptlet

Definition at line 386 of file psm.c.

References RPMTAG_POSTIN, RPMTAG_POSTTRANS, RPMTAG_POSTUN, RPMTAG_PREIN, RPMTAG_PRETRANS, RPMTAG_PREUN, RPMTAG_TRIGGERIN, RPMTAG_TRIGGERPOSTUN, RPMTAG_TRIGGERPREIN, RPMTAG_TRIGGERUN, and RPMTAG_VERIFYSCRIPT.

Referenced by rpmpsmStage(), runInstScript(), and runScript().

static rpmScriptID tag2slx ( int  tag)
static
rpmpsm XrpmpsmLink ( rpmpsm  psm,
const char *  msg,
const char *  fn,
unsigned  ln 
)
Todo:
Remove debugging entry from the ABI.

Definition at line 1280 of file psm.c.

References _psm_debug, and rpmpsm_s::nrefs.

rpmpsm XrpmpsmUnlink ( rpmpsm  psm,
const char *  msg,
const char *  fn,
unsigned  ln 
)
Todo:
Remove debugging entry from the ABI.

Definition at line 1269 of file psm.c.

References _psm_debug, and rpmpsm_s::nrefs.

Variable Documentation

int _psm_debug = 0

Definition at line 40 of file psm.c.

Referenced by XrpmpsmLink(), and XrpmpsmUnlink().

int _psm_threads = 0

Definition at line 42 of file psm.c.

Referenced by rpmpsmNext().

int ldconfig_done = 0
static

Definition at line 575 of file psm.c.

const char* ldconfig_path = "/sbin/ldconfig"
static

Definition at line 578 of file psm.c.

char* SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"
static

Definition at line 379 of file psm.c.

Referenced by runScript().