The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

psm.c (3)
  • >> psm.c (3) ( Linux man: Библиотечные вызовы )
  •  

    NAME

    lib/psm.c - Package state machine to handle a package from a transaction set. 
     
    

    SYNOPSIS


    #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'
     

    Data Structures


    struct tagMacro
    Macros to be defined from per-header tag values.  

    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.
    int rpmInstallLoadMacros (TFI_t fi, Header h)
    Define per-header macros.
    int mergeFiles (TFI_t fi, Header h, Header newH)
    Copy file data from h to newH.
    int markReplacedFiles (PSM_t psm)
    Mark files in database shared with this package as 'replaced'.
    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.
    const char *const tag2sln (int tag)
    Return scriptlet name from tag.
    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.
    rpmRC runInstScript (PSM_t psm)
    Retrieve and run scriptlet from header.
    int handleOneTrigger (PSM_t psm, Header sourceH, Header triggeredH, int arg2, unsigned char *triggersAlreadyRun)

    int runTriggers (PSM_t psm)
    Run trigger scripts in the database that are fired by this header.
    int runImmedTriggers (PSM_t psm)
    Run triggers from this header that are fired by headers in the database.
    const char *const pkgStageString (pkgStage a)

    int psmStage (PSM_t psm, pkgStage stage)
    Package state machine driver.  

    Variables


    tagMacro tagMacros []
    Macros to be defined from per-header tag values.
    char * SCRIPT_PATH
     

    DETAILED DESCRIPTION

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

    Definition in file psm.c.  

    FUNCTION DOCUMENTATION

     

    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, 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, HFD_t, 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().  

    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 1105 of file psm.c.

    References headerMatchesDepFlags(), headerNVR(), transactionFileInfo_s::hfd, HFD_t, transactionFileInfo_s::hge, HGE_t, int_32, rpmTransactionSet_s::rpmdb, rpmdbCountPackages(), rpmRC, RPMRC_FAIL, RPMRC_OK, RPMTAG_TRIGGERFLAGS, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, RPMTAG_TRIGGERSCRIPTPROG, RPMTAG_TRIGGERSCRIPTS, RPMTAG_TRIGGERVERSION, rpmTagType, and runScript().

    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, HFD_t, transactionFileInfo_s::hge, HGE_t, 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, uint_32, transactionFileInfo_s::version, xcalloc(), xmalloc(), and xstrdup().

    Referenced by genCpioListAndHeader(), rpmInstallSourcePackage(), rpmRunTransactions(), and rpmVerifyScript().  

    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, transactionFileInfo_s::hge, HGE_t, sharedFileInfo::otherFileNum, sharedFileInfo::otherPkg, transactionFileInfo_s::replaced, rpmTransactionSet_s::rpmdb, rpmdbAppendIterator(), rpmdbFreeIterator(), rpmdbGetIteratorOffset(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), rpmdbSetIteratorModified(), rpmdbSetIteratorRewrite(), RPMFILE_STATE_REPLACED, and RPMTAG_FILESTATES.

    Referenced by psmStage().  

    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 _, FA_SKIPMULTILIB, fileAction, headerAddOrAppendEntry(), HFD_t, HGE_t, HME_t, int_16, int_32, int_8, isDependsMULTILIB, RPM_CHAR_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_STRING_ARRAY_TYPE, RPMERR_DATATYPE, rpmError, RPMSENSE_SENSEMASK, rpmTag, 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, rpmTagType, uint_32, and xcalloc().

    Referenced by psmStage().  

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

    Definition at line 1310 of file psm.c.

    References pkgStage, 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 1354 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, rpmdb_s::db_chrootDone, transactionFileInfo_s::epoch, 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, fileAction, 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, HFD_t, transactionFileInfo_s::hge, HGE_t, transactionFileInfo_s::hme, HME_t, hPTR_t, rpmTransactionSet_s::id, int_32, availablePackage::key, rpmlead::major, transactionFileInfo_s::mapflags, markReplacedFiles(), mergeFiles(), psm_s::mi, rpmlead::minor, transactionFileInfo_s::name, rpmlead::name, rpmTransactionSet_s::notify, rpmTransactionSet_s::notifyData, psm_s::npkgs_installed, psm_s::oh, rpmlead::osnum, psm_s::pkgfn, pkgStage, 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, psm_s::rc, transactionFileInfo_s::record, transactionFileInfo_s::release, rpmTransactionSet_s::rootDir, RPM_CHAR_TYPE, RPM_INT32_TYPE, rpmBuildFileList(), RPMCALLBACK_CPIO_ERROR, RPMCALLBACK_INST_PROGRESS, RPMCALLBACK_UNINST_START, RPMCALLBACK_UNINST_STOP, RPMCALLBACK_UNPACK_ERROR, 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(), psm_s::rpmio_flags, RPMLEAD_BINARY, RPMMESS_DEBUG, RPMMESS_VERBOSE, RPMMESS_WARNING, rpmMessage, RPMMIRE_DEFAULT, rpmRC, 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, 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, uint_32, unameToUid(), urlPath(), transactionFileInfo_s::version, psm_s::what, writeLead(), xcalloc(), and xmalloc().

    Referenced by rpmInstallSourcePackage(), rpmRunTransactions(), and rpmVerifyScript().  

    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(), HGE_t, int_32, 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, rpmTagType, 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, HFD_t, transactionFileInfo_s::hge, HGE_t, availableList_s::list, loadFi(), transactionFileInfo_s::mapflags, rpmTransactionSet_s::notify, rpmTransactionSet_s::notifyData, PSM_FINI, PSM_PKGINSTALL, PSM_PROCESS, psmStage(), rpmTransactionSet_s::rootDir, rpmBuildFileList(), rpmCallbackData, rpmCallbackFunction, RPMERR_NOSPEC, RPMERR_NOTSRPM, rpmError, RPMFILE_SPECFILE, rpmGenPath(), rpmInstallLoadMacros(), rpmRC, 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(), int_32, RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, and rpmvercmp().

    Referenced by alAddPackage(), ensureOlder(), findUpgradePackages(), pkgCompareVer(), rpmInstall(), rpmtransAddPackage(), and unmarkPackagesAlreadyInstalled().  

    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 1258 of file psm.c.

    References alloca(), transactionFileInfo_s::h, handleOneTrigger(), transactionFileInfo_s::hfd, HFD_t, transactionFileInfo_s::hge, HGE_t, int_32, rpmTransactionSet_s::rpmdb, rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbNextIterator(), rpmRC, RPMRC_OK, RPMTAG_NAME, RPMTAG_TRIGGERINDEX, RPMTAG_TRIGGERNAME, and rpmTagType.

    Referenced by psmStage().  

    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 1058 of file psm.c.

    References alloca(), transactionFileInfo_s::h, transactionFileInfo_s::hfd, HFD_t, transactionFileInfo_s::hge, HGE_t, RPM_STRING_TYPE, rpmRC, RPMRC_OK, rpmTagType, runScript(), and tag2sln().

    Referenced by psmStage().  

    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(), dosetenv(), errno, Fclose(), fdDup(), fdLink, Ferror(), Fileno(), Fopen(), Fwrite(), headerNVR(), transactionFileInfo_s::hfd, HFD_t, transactionFileInfo_s::hge, HGE_t, makeTempFile(), rpmTransactionSet_s::rootDir, RPMERR_SCRIPT, rpmError, rpmExpand(), rpmIsDebug, rpmIsVerbose, rpmRC, RPMRC_FAIL, RPMRC_OK, RPMTAG_INSTALLPREFIX, RPMTAG_INSTPREFIXES, rpmTagType, SCRIPT_PATH, rpmTransactionSet_s::scriptFd, URL_IS_PATH, URL_IS_UNKNOWN, and urlIsURL().

    Referenced by handleOneTrigger(), and runInstScript().  

    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 1221 of file psm.c.

    References transactionFileInfo_s::h, handleOneTrigger(), transactionFileInfo_s::name, rpmTransactionSet_s::rpmdb, rpmdbCountPackages(), rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbNextIterator(), rpmRC, RPMRC_OK, and RPMTAG_TRIGGERNAME.

    Referenced by psmStage().  

    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().  

    AUTHOR

    Generated automatically by Doxygen for rpm from the source code.


     

    Index

    NAME
    SYNOPSIS
    Data Structures
    Functions
    Variables
    DETAILED DESCRIPTION
    FUNCTION DOCUMENTATION
    rpmRC chkdir (const char * dpath, const char * dname) [static]
    const char* const fiTypeString (TFI_t fi)
    void freeFi (TFI_t fi)
    int handleOneTrigger (PSM_t psm, Header sourceH, Header triggeredH, int arg2, unsigned char * triggersAlreadyRun) [static]
    void loadFi (Header h, TFI_t fi)
    int markReplacedFiles (PSM_t psm) [static]
    int mergeFiles (TFI_t fi, Header h, Header newH) [static]
    const char* const pkgStageString (pkgStage a) [static]
    int psmStage (PSM_t psm, pkgStage stage)
    int rpmInstallLoadMacros (TFI_t fi, Header h) [static]
    rpmRC rpmInstallSourcePackage (const char * rootDir, FD_t fd, const char ** specFilePtr, rpmCallbackFunction notify, rpmCallbackData notifyData, char ** cookie)
    int rpmVersionCompare (Header first, Header second)
    int runImmedTriggers (PSM_t psm) [static]
    rpmRC runInstScript (PSM_t psm) [static]
    int runScript (PSM_t psm, Header h, const char * sln, int progArgc, const char ** progArgv, const char * script, int arg1, int arg2) [static]
    int runTriggers (PSM_t psm) [static]
    const char* const tag2sln (int tag) [static]
    VARIABLE DOCUMENTATION
    char* SCRIPT_PATH [static]
    struct tagMacro tagMacros[] [static]
    AUTHOR


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру