Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# psm.c File Reference

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

`#include "system.h"`
`#include "psm.h"`
`#include <rpmmacro.h>`
`#include <rpmurl.h>`
`#include "depends.h"`
`#include "rpmlead.h"`
`#include "signature.h"`
`#include "ugid.h"`
`#include "misc.h"`
`#include "rpmdb.h"`
`#include "debug.h"`

Go to the source code of this file.

## Functions
int | rpmVersionCompare (Header first, Header second)
| Compare headers to determine which header is "newer".
void | loadFi (Header h, TFI_t fi)
| Load data from header into transaction file element info.
void | freeFi (TFI_t fi)
| Destroy transaction element file info.
const char *const | fiTypeString (TFI_t fi)
| Return formatted string representation of package disposition.
static int | rpmInstallLoadMacros (TFI_t fi, Header h)
| Define per-header macros.
static int | mergeFiles (TFI_t fi, Header h, Header newH)
| Copy file data from h to newH.
static int | markReplacedFiles (PSM_t psm)
| Mark files in database shared with this package as "replaced".
static rpmRC | chkdir (const char *dpath, const char *dname)
| Create directory if it does not exist, make sure path is writable.
rpmRC | rpmInstallSourcePackage (const char *rootDir, FD_t fd, const char **specFilePtr, rpmCallbackFunction notify, rpmCallbackData notifyData, char **cookie)
| Install source package.
static const char *const | tag2sln (int tag)
| Return scriptlet name from tag.
static int | runScript (PSM_t 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 (PSM_t psm)
| Retrieve and run scriptlet from header.
static int | handleOneTrigger (PSM_t psm, Header sourceH, Header triggeredH, int arg2, unsigned char *triggersAlreadyRun)
static int | runTriggers (PSM_t psm)
| Run trigger scripts in the database that are fired by this header.
static int | runImmedTriggers (PSM_t psm)
| Run triggers from this header that are fired by headers in the database.
static const char *const | pkgStageString (pkgStage a)
int | psmStage (PSM_t psm, pkgStage stage)
| Package state machine driver.
## Variables
static struct tagMacro | tagMacros []
| Macros to be defined from per-header tag values.
static char * | SCRIPT_PATH

## Detailed Description

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

Definition in file psm.c.

## Function Documentation

static rpmRC chkdir | ( | const char * | dpath,
|  | const char * | dname
| ) | `[static]`

  | Create directory if it does not exist, make sure path is writable. Note: This will only create last component of directory path. Parameters:
  | dpath | directory path
  | dname | directory use
Returns: rpmRC return code Definition at line 577 of file psm.c. References _, Access(), errno, Mkdir(), RPMERR_CREATE, rpmError, RPMRC_FAIL, RPMRC_OK, Stat(), URL_IS_DASH, URL_IS_FTP, URL_IS_HTTP, URL_IS_PATH, URL_IS_UNKNOWN, urlPath(), and W_OK. Referenced by rpmInstallSourcePackage().

const char* const fiTypeString | ( | TFI_t | fi | ) |

  | Return formatted string representation of package disposition. Parameters:
  | a | package dispostion
Returns: formatted string Definition at line 235 of file psm.c. References transactionFileInfo_s::type. Referenced by fsmStage().

void freeFi | ( | TFI_t | fi | ) |

  | Destroy transaction element file info. Parameters:
  | fi | transaction element file info
Definition at line 188 of file psm.c. References _free(), transactionFileInfo_s::actions, transactionFileInfo_s::apath, transactionFileInfo_s::bnl, transactionFileInfo_s::dil, transactionFileInfo_s::dnl, transactionFileInfo_s::fflags, transactionFileInfo_s::fgids, transactionFileInfo_s::fgroup, transactionFileInfo_s::flangs, transactionFileInfo_s::flinks, transactionFileInfo_s::fmapflags, transactionFileInfo_s::fmd5s, transactionFileInfo_s::fmodes, freeFSM(), transactionFileInfo_s::fsizes, transactionFileInfo_s::fsm, transactionFileInfo_s::fstates, transactionFileInfo_s::fuids, transactionFileInfo_s::fuser, transactionFileInfo_s::h, headerFree(), transactionFileInfo_s::hfd, transactionFileInfo_s::name, transactionFileInfo_s::obnl, transactionFileInfo_s::odnl, transactionFileInfo_s::release, transactionFileInfo_s::replaced, transactionFileInfo_s::replacedSizes, transactionFileInfo_s::type, and transactionFileInfo_s::version. Referenced by freeFl(), freePackage(), freeSpec(), rpmInstallSourcePackage(), and rpmVerifyScript().

static int handleOneTrigger | ( | PSM_t | psm,
|  | Header | sourceH,
|  | Header | triggeredH,
|  | int | arg2,
|  | unsigned char * | triggersAlreadyRun
| ) | `[static]`

  | Parameters:
  | psm | package state machine data
  | sourceH |
  | triggeredH |
  | arg2 |
  | triggersAlreadyRun |
Returns: Definition at line 1093 of file psm.c. References psm_s::countCorrection, psm_s::fi, headerMatchesDepFlags(), headerNVR(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, rpmTransactionSet_s::rpmdb, rpmdbCountPackages(), RPMRC_FAIL, RPMRC_OK, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, RPMTAG_TRIGGERVERSION, runScript(), psm_s::sense, and psm_s::ts. Referenced by runImmedTriggers(), and runTriggers().

void loadFi | ( | Header | h,
|  | TFI_t | fi
| ) |

  | Load data from header into transaction file element info. Parameters:
  | h | header
  | fi | transaction element file info
Definition at line 72 of file psm.c. References transactionFileInfo_s::action, transactionFileInfo_s::actions, transactionFileInfo_s::archiveSize, transactionFileInfo_s::bnl, transactionFileInfo_s::bnlmax, CPIO_ALL_HARDLINKS, CPIO_MAP_ABSOLUTE, CPIO_MAP_ADDDOT, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, transactionFileInfo_s::dc, transactionFileInfo_s::dil, transactionFileInfo_s::dnl, transactionFileInfo_s::dnlmax, transactionFileInfo_s::dperms, transactionFileInfo_s::epoch, FA_UNKNOWN, transactionFileInfo_s::fc, transactionFileInfo_s::fflags, transactionFileInfo_s::flags, transactionFileInfo_s::flangs, transactionFileInfo_s::flinks, transactionFileInfo_s::fmd5s, transactionFileInfo_s::fmodes, transactionFileInfo_s::fmtimes, transactionFileInfo_s::fperms, transactionFileInfo_s::frdevs, transactionFileInfo_s::fsizes, transactionFileInfo_s::fsm, transactionFileInfo_s::fstates, transactionFileInfo_s::h, transactionFileInfo_s::hae, headerFree(), headerLink(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, transactionFileInfo_s::hme, transactionFileInfo_s::hre, transactionFileInfo_s::mapflags, transactionFileInfo_s::name, newFSM(), transactionFileInfo_s::release, transactionFileInfo_s::replacedSizes, RPMTAG_ARCHIVESIZE, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_EPOCH, RPMTAG_FILEFLAGS, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMD5S, RPMTAG_FILEMODES, RPMTAG_FILEMTIMES, RPMTAG_FILERDEVS, RPMTAG_FILESIZES, RPMTAG_FILESTATES, RPMTAG_NAME, RPMTAG_RELEASE, RPMTAG_VERSION, transactionFileInfo_s::type, transactionFileInfo_s::version, xcalloc(), xmalloc(), and xstrdup(). Referenced by genCpioListAndHeader(), rpmInstallSourcePackage(), rpmRunTransactions(), and rpmVerifyScript().

static int markReplacedFiles | ( | PSM_t | psm | ) | `[static]`

  | Mark files in database shared with this package as "replaced". Parameters:
  | psm | package state machine data
Returns: 0 always Definition at line 497 of file psm.c. References alloca(), transactionFileInfo_s::fc, psm_s::fi, transactionFileInfo_s::hge, sharedFileInfo::otherFileNum, sharedFileInfo::otherPkg, transactionFileInfo_s::replaced, rpmTransactionSet_s::rpmdb, rpmdbAppendIterator(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), rpmdbSetIteratorModified(), rpmdbSetIteratorRewrite(), RPMFILE_STATE_REPLACED, RPMTAG_FILESTATES, and psm_s::ts. Referenced by psmStage().

static int mergeFiles | ( | TFI_t | fi,
|  | Header | h,
|  | Header | newH
| ) | `[static]`

  | Copy file data from h to newH. Parameters:
  | h | header from
  | newH | header to
  | actions | array of file dispositions
Returns: 0 on success, 1 on failure Definition at line 314 of file psm.c. References _, transactionFileInfo_s::actions, FA_SKIPMULTILIB, headerAddOrAppendEntry(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, transactionFileInfo_s::hme, isDependsMULTILIB, RPM_CHAR_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_STRING_ARRAY_TYPE, RPMERR_DATATYPE, rpmError, RPMSENSE_SENSEMASK, RPMTAG_BASENAMES, RPMTAG_CONFLICTFLAGS, RPMTAG_CONFLICTNAME, RPMTAG_CONFLICTVERSION, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILEDEVICES, RPMTAG_FILEFLAGS, RPMTAG_FILEGROUPNAME, RPMTAG_FILEINODES, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMD5S, RPMTAG_FILEMODES, RPMTAG_FILEMTIMES, RPMTAG_FILERDEVS, RPMTAG_FILESIZES, RPMTAG_FILESTATES, RPMTAG_FILEUSERNAME, RPMTAG_FILEVERIFYFLAGS, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, RPMTAG_SIZE, and xcalloc(). Referenced by psmStage().

static const char* const pkgStageString | ( | pkgStage | a | ) | `[static]`

| Definition at line 1298 of file psm.c. References 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, and PSM_UNKNOWN. Referenced by psmStage().

int psmStage | ( | PSM_t | 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 1342 of file psm.c. References _, _free(), transactionFileInfo_s::action, transactionFileInfo_s::actions, psm_s::amount, transactionFileInfo_s::ap, transactionFileInfo_s::apath, transactionFileInfo_s::archiveSize, rpmlead::archnum, buildOrigFileList(), psm_s::cfd, rpmTransactionSet_s::chrootDone, psm_s::chrootDone, psm_s::countCorrection, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, cpioStrerror(), rpmTransactionSet_s::currDir, errno, FA_COPYOUT, psm_s::failedFile, transactionFileInfo_s::fc, Fclose(), psm_s::fd, availablePackage::fd, fdDup(), Fdopen(), Ferror(), Fflush(), transactionFileInfo_s::fgids, transactionFileInfo_s::fgroup, psm_s::fi, Fileno(), transactionFileInfo_s::fmodes, Fopen(), transactionFileInfo_s::fsm, FSM_PKGBUILD, FSM_PKGCOMMIT, FSM_PKGERASE, FSM_PKGINSTALL, fsmSetup(), fsmTeardown(), transactionFileInfo_s::fstates, Fstrerror(), transactionFileInfo_s::fuids, transactionFileInfo_s::fuser, transactionFileInfo_s::gid, gnameToGid(), psm_s::goal, transactionFileInfo_s::h, HEADER_MAGIC_YES, headerAddEntry(), headerCopy(), headerCopyLoad(), headerFree(), headerFreeData(), headerFreeIterator(), headerGetEntry(), headerInitIterator(), headerIsEntry(), headerLink(), headerNew(), headerNextIterator(), headerRegenSigHeader(), headerSprintf(), headerWrite(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, transactionFileInfo_s::hme, rpmTransactionSet_s::id, availablePackage::key, rpmlead::major, transactionFileInfo_s::mapflags, markReplacedFiles(), mergeFiles(), psm_s::mi, rpmlead::minor, transactionFileInfo_s::name, rpmTransactionSet_s::notify, rpmTransactionSet_s::notifyData, psm_s::npkgs_installed, psm_s::oh, rpmlead::osnum, psm_s::pkgfn, pkgStageString(), psm_s::pkgURL, psm_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, psmStage(), psm_s::rc, transactionFileInfo_s::record, transactionFileInfo_s::release, rpmTransactionSet_s::rootDir, RPM_CHAR_TYPE, RPM_INT32_TYPE, rpmBuildFileList(), RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP, rpmTransactionSet_s::rpmdb, rpmdbAdd(), rpmdbCountPackages(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), rpmdbRemove(), rpmdbSetIteratorRE(), RPMERR_CPIO, RPMERR_NOSPACE, RPMERR_SCRIPT, rpmError, RPMFILE_STATE_NORMAL, rpmFreeSignature(), rpmGenPath(), rpmGetArchInfo(), rpmGetOsInfo(), rpmGetPath(), rpmHeaderFormats, psm_s::rpmio_flags, RPMLEAD_BINARY, RPMMESS_DEBUG, RPMMESS_VERBOSE, RPMMESS_WARNING, rpmMessage, RPMMIRE_DEFAULT, RPMRC_FAIL, RPMRC_OK, RPMSENSE_TRIGGERIN, RPMSENSE_TRIGGERPOSTUN, RPMSENSE_TRIGGERUN, RPMSIGTYPE_HEADERSIG, RPMTAG_DEFAULTPREFIX, RPMTAG_FILEGROUPNAME, RPMTAG_FILESTATES, RPMTAG_FILEUSERNAME, RPMTAG_HEADERIMAGE, RPMTAG_HEADERIMMUTABLE, RPMTAG_INSTALLTIME, RPMTAG_MULTILIBS, RPMTAG_NAME, RPMTAG_ORIGBASENAMES, RPMTAG_PAYLOADCOMPRESSOR, RPMTAG_POSTIN, RPMTAG_POSTINPROG, RPMTAG_POSTUN, RPMTAG_POSTUNPROG, RPMTAG_PREIN, RPMTAG_PREINPROG, RPMTAG_PREUN, RPMTAG_PREUNPROG, RPMTAG_RELEASE, RPMTAG_REMOVETID, RPMTAG_VERSION, rpmTagTable, RPMTRANS_FLAG_APPLYONLY, RPMTRANS_FLAG_JUSTDB, RPMTRANS_FLAG_MULTILIB, 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, rpmWriteSignature(), runImmedTriggers(), runInstScript(), runTriggers(), psm_s::scriptArg, psm_s::scriptTag, psm_s::sense, rpmlead::signature_type, psm_s::stepName, stpcpy(), transactionFileInfo_s::striplen, tag2sln(), psm_s::total, rpmTransactionSet_s::transFlags, psm_s::ts, rpmlead::type, transactionFileInfo_s::uid, unameToUid(), urlPath(), transactionFileInfo_s::version, psm_s::what, writeLead(), xcalloc(), and xmalloc(). Referenced by psmStage(), rpmInstallSourcePackage(), rpmRunTransactions(), and rpmVerifyScript().

static int rpmInstallLoadMacros | ( | TFI_t | fi,
|  | Header | h
| ) | `[static]`

  | Define per-header macros. Parameters:
  | fi | transaction element file info
  | h | header
Returns: 0 always Definition at line 267 of file psm.c. References addMacro(), transactionFileInfo_s::hge, tagMacro::macroname, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, tagMacro::tag, and tagMacros. Referenced by rpmInstallSourcePackage().

rpmRC rpmInstallSourcePackage | ( | const char * | rootDir,
|  | FD_t | fd,
|  | const char ** | specFilePtr,
|  | rpmCallbackFunction | notify,
|  | rpmCallbackData | notifyData,
|  | char ** | cookie
| ) |

  | Install source package. Parameters:
  | rootDir | path to top of install tree (or NULL)
  | fd | file handle
  Return values:
  | specFilePtr | address of spec file name (or NULL)
  Parameters:
  | notify | progress callback
  | notifyData | progress callback private data
  Return values:
  | cooke | address of cookie pointer (or NULL)
Returns: rpmRC return code Definition at line 612 of file psm.c. References _, _free(), transactionFileInfo_s::actions, rpmTransactionSet_s::addedPackages, transactionFileInfo_s::ap, transactionFileInfo_s::apath, transactionFileInfo_s::astriplen, transactionFileInfo_s::bnl, chkdir(), CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, transactionFileInfo_s::dc, transactionFileInfo_s::dil, transactionFileInfo_s::dnl, FA_CREATE, transactionFileInfo_s::fc, transactionFileInfo_s::fflags, transactionFileInfo_s::fgids, transactionFileInfo_s::fmapflags, transactionFileInfo_s::fmd5s, freeFi(), transactionFileInfo_s::fuids, transactionFileInfo_s::gid, transactionFileInfo_s::h, headerFree(), headerIsEntry(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, availableList_s::list, loadFi(), transactionFileInfo_s::mapflags, rpmTransactionSet_s::notify, rpmTransactionSet_s::notifyData, PSM_FINI, PSM_PKGINSTALL, PSM_PROCESS, psmStage(), rpmTransactionSet_s::rootDir, rpmBuildFileList(), RPMERR_NOSPEC, RPMERR_NOTSRPM, rpmError, RPMFILE_SPECFILE, rpmGenPath(), rpmInstallLoadMacros(), RPMRC_FAIL, RPMRC_OK, rpmReadPackageHeader(), RPMTAG_COOKIE, rpmtransAddPackage(), rpmtransCreateSet(), rpmtransFree(), stpcpy(), transactionFileInfo_s::striplen, transactionFileInfo_s::type, transactionFileInfo_s::uid, xcalloc(), xmalloc(), and xstrdup(). Referenced by rpmInstall(), and rpmInstallSource().

int rpmVersionCompare | ( | Header | first,
|  | Header | second
| ) |

  | Compare headers to determine which header is "newer". Parameters:
  | first | 1st header
  | second | 2nd header
Returns: result of comparison Definition at line 36 of file psm.c. References headerGetEntry(), RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, and rpmvercmp(). Referenced by alAddPackage(), ensureOlder(), findUpgradePackages(), pkgCompareVer(), rpmInstall(), rpmtransAddPackage(), unmarkPackagesAlreadyInstalled(), and versionCompare().

static int runImmedTriggers | ( | PSM_t | psm | ) | `[static]`

  | Run triggers from this header that are fired by headers in the database. Parameters:
  | psm | package state machine data
Returns: 0 on success, 1 on error Definition at line 1246 of file psm.c. References alloca(), psm_s::fi, transactionFileInfo_s::h, handleOneTrigger(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, rpmTransactionSet_s::rpmdb, rpmdbFreeIterator(), rpmdbGetIteratorCount(), rpmdbInitIterator(), rpmdbNextIterator(), RPMRC_OK, RPMTAG_NAME, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, and psm_s::ts. Referenced by psmStage().

static rpmRC runInstScript | ( | PSM_t | psm | ) | `[static]`

  | Retrieve and run scriptlet from header. Parameters:
  | psm | package state machine data
Returns: rpmRC return code Definition at line 1046 of file psm.c. References alloca(), psm_s::fi, transactionFileInfo_s::h, transactionFileInfo_s::hfd, transactionFileInfo_s::hge, psm_s::progTag, RPM_STRING_TYPE, RPMRC_OK, runScript(), psm_s::scriptArg, psm_s::scriptTag, and tag2sln(). Referenced by psmStage().

static int runScript | ( | PSM_t | 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:
  | psm | package state machine data
  | h | header
  | sln | name of scriptlet section
  | progArgc | no. of args from header
  | progArgv | args from header, progArgv[0] is the interpreter to use
  | script | scriptlet from header
  | arg1 | no. instances of package installed after scriptlet exec (-1 is no arg)
  | arg2 | ditto, but for the target package
Returns: 0 on success, 1 on error Definition at line 825 of file psm.c. References _, _free(), alloca(), rpmTransactionSet_s::chrootDone, doputenv(), errno, Fclose(), fdDup(), fdLink, Ferror(), psm_s::fi, Fileno(), Fopen(), Fwrite(), headerNVR(), transactionFileInfo_s::hfd, transactionFileInfo_s::hge, makeTempFile(), rpmTransactionSet_s::rootDir, RPMERR_SCRIPT, rpmError, rpmExpand(), rpmIsDebug, rpmIsVerbose, RPMRC_FAIL, RPMRC_OK, RPMTAG_INSTALLPREFIX, RPMTAG_INSTPREFIXES, SCRIPT_PATH, rpmTransactionSet_s::scriptFd, psm_s::ts, URL_IS_PATH, URL_IS_UNKNOWN, and urlIsURL(). Referenced by handleOneTrigger(), and runInstScript().

static int runTriggers | ( | PSM_t | psm | ) | `[static]`

  | Run trigger scripts in the database that are fired by this header. Parameters:
  | psm | package state machine data
Returns: 0 on success, 1 on error Definition at line 1209 of file psm.c. References psm_s::countCorrection, psm_s::fi, transactionFileInfo_s::h, handleOneTrigger(), transactionFileInfo_s::name, rpmTransactionSet_s::rpmdb, rpmdbCountPackages(), rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbNextIterator(), RPMRC_OK, RPMTAG_TRIGGERNAME, and psm_s::ts. Referenced by psmStage().

static const char* const tag2sln | ( | int | tag | ) | `[static]`

  | Return scriptlet name from tag. Parameters:
  | tag | scriptlet tag
Returns: name of scriptlet Definition at line 794 of file psm.c. References RPMTAG_POSTIN, RPMTAG_POSTUN, RPMTAG_PREIN, RPMTAG_PREUN, and RPMTAG_VERIFYSCRIPT. Referenced by psmStage(), and runInstScript().

## Variable Documentation

char* SCRIPT_PATH`[static]`

| Initial value:
            "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin"
Definition at line 786 of file psm.c. Referenced by runScript().

struct tagMacro tagMacros[]`[static]`

| Macros to be defined from per-header tag values. Todo: Should other macros be added from header when installing a package? Referenced by rpmInstallLoadMacros().