The OpenNET Project / Index page

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

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

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

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

    NAME

    lib/transaction.c -  
     
    

    SYNOPSIS


    #include 'system.h'
    #include 'rpmmacro.h'
    #include 'psm.h'
    #include 'rpmdb.h'
    #include 'fprint.h'
    #include 'rpmhash.h'
    #include 'misc.h'
    #include 'debug.h'
     

    Data Structures


    struct diskspaceInfo

    struct tsIterator_s
    Iterator across transaction elements, forward on install, backward on erase.  

    Defines


    #define MNT_DEV_PREFIX '/mnt/'

    #define MNT_DEV_PREFIX_LENGTH (sizeof(MNT_DEV_PREFIX)-1)

    #define adj_fs_blocks(_nb) (((_nb) * 21) / 20)

    #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))

    #define XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b))))

    #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))

    #define NOTIFY(_ts, _al) if ((_ts)->notify) (void) (_ts)->notify _al
     

    Functions


    void * freeFl (rpmTransactionSet ts, TFI_t flList)

    void rpmtransSetScriptFd (rpmTransactionSet ts, FD_t fd)

    int rpmtransGetKeys (const rpmTransactionSet ts, const void ***ep, int *nep)

    rpmProblemSet psCreate (void)

    void psAppend (rpmProblemSet probs, rpmProblemType type, const struct availablePackage *alp, const char *dn, const char *bn, Header altH, unsigned long ulong1)

    int archOkay (Header h)

    int osOkay (Header h)

    void rpmProblemSetFree (rpmProblemSet probs)
    Destroy problem set.
    const char *const ftstring (fileTypes ft)

    fileTypes whatis (uint_16 mode)

    Header relocateFileList (const rpmTransactionSet ts, TFI_t fi, struct availablePackage *alp, Header origH, fileAction *actions)
    Relocate files in header.
    int psTrim (rpmProblemSet filter, rpmProblemSet target)

    int sharedCmp (const void *one, const void *two)

    fileAction decideFileFate (const char *dirName, const char *baseName, short dbMode, const char *dbMd5, const char *dbLink, short newMode, const char *newMd5, const char *newLink, int newFlags, rpmtransFlags transFlags)

    int filecmp (short mode1, const char *md51, const char *link1, short mode2, const char *md52, const char *link2)

    int handleInstInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo *shared, int sharedCount, int reportConflicts, rpmProblemSet probs, rpmtransFlags transFlags)

    int handleRmvdInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo *shared, int sharedCount)

    void handleOverlappedFiles (TFI_t fi, hashTable ht, rpmProblemSet probs, struct diskspaceInfo *dsl)
    Update disk space needs on each partition for this package.
    int ensureOlder (struct availablePackage *alp, Header old, rpmProblemSet probs)

    void skipFiles (const rpmTransactionSet ts, TFI_t fi)

    int tsGetOc (void *a)
    Return transaction element order count.
    availablePackage * tsGetAlp (void *a)
    Return transaction element available package pointer.
    void * tsFreeIterator (const void *a)
    Destroy transaction element iterator.
    void * tsInitIterator (const void *a)
    Create transaction element iterator.
    TFI_t tsNextIterator (void *a)
    Return next transaction element's file info.
    int rpmRunTransactions (rpmTransactionSet ts, rpmCallbackFunction notify, rpmCallbackData notifyData, rpmProblemSet okProbs, rpmProblemSet *newProbs, rpmtransFlags transFlags, rpmprobFilterFlags ignoreSet)
     

    DETAILED DESCRIPTION

    Definition in file transaction.c.  

    DEFINE DOCUMENTATION

     

    #define adj_fs_blocks(_nb) (((_nb) * 21) / 20)

    Definition at line 65 of file transaction.c.

    Referenced by rpmRunTransactions().  

    #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))

    Definition at line 301 of file transaction.c.  

    #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))

    Definition at line 69 of file transaction.c.

    Referenced by handleOverlappedFiles().  

    #define MNT_DEV_PREFIX '/mnt/'

    Definition at line 42 of file transaction.c.

    Referenced by rpmRunTransactions().  

    #define MNT_DEV_PREFIX_LENGTH (sizeof(MNT_DEV_PREFIX)-1)

    Definition at line 43 of file transaction.c.

    Referenced by rpmRunTransactions().  

    #define NOTIFY(_ts, _al) if ((_ts)->notify) (void) (_ts)->notify _al

    Definition at line 1517 of file transaction.c.

    Referenced by rpmRunTransactions().  

    #define XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b))))

    Definition at line 71 of file transaction.c.

    Referenced by psTrim().  

    FUNCTION DOCUMENTATION

     

    int archOkay (Header h) [static]

    Definition at line 203 of file transaction.c.

    References headerGetEntry(), int_8, RPM_INT8_TYPE, RPM_MACHTABLE_INSTARCH, rpmGetArchInfo(), rpmMachineScore(), and RPMTAG_ARCH.

    Referenced by rpmRunTransactions().  

    fileAction decideFileFate (const char * dirName, const char * baseName, short dbMode, const char * dbMd5, const char * dbLink, short newMode, const char * newMd5, const char * newLink, int newFlags, rpmtransFlags transFlags) [static]

    Definition at line 788 of file transaction.c.

    References _, alloca(), domd5(), FA_ALTNAME, FA_CREATE, FA_SAVE, FA_SKIP, fileAction, fileTypes, LINK, REG, RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMMESS_DEBUG, rpmMessage, RPMTRANS_FLAG_ALLFILES, rpmtransFlags, stpcpy(), whatis(), and XDIR.

    Referenced by handleInstInstalledFiles().  

    int ensureOlder (struct availablePackage * alp, Header old, rpmProblemSet probs) [static]

    Definition at line 1234 of file transaction.c.

    References psAppend(), RPMPROB_OLDPACKAGE, and rpmVersionCompare().

    Referenced by rpmRunTransactions().  

    int filecmp (short mode1, const char * md51, const char * link1, short mode2, const char * md52, const char * link2) [static]

    Definition at line 881 of file transaction.c.

    References fileTypes, LINK, REG, and whatis().

    Referenced by handleInstInstalledFiles(), and handleOverlappedFiles().  

    void* freeFl (rpmTransactionSet ts, TFI_t flList) [static]

    Definition at line 73 of file transaction.c.

    References _free(), and freeFi().

    Referenced by rpmRunTransactions().  

    const char* const ftstring (fileTypes ft) [static]

    Definition at line 273 of file transaction.c.

    References BDEV, CDEV, fileTypes, LINK, PIPE, REG, SOCK, and XDIR.

    Referenced by relocateFileList().  

    int handleInstInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo * shared, int sharedCount, int reportConflicts, rpmProblemSet probs, rpmtransFlags transFlags) [static]

    Definition at line 898 of file transaction.c.

    References decideFileFate(), filecmp(), HFD_t, HGE_t, psAppend(), rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), RPMFILE_CONFIG, RPMFILE_STATE_NORMAL, RPMPROB_FILE_CONFLICT, RPMTAG_FILEFLAGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMD5S, RPMTAG_FILEMODES, RPMTAG_FILESIZES, RPMTAG_FILESTATES, rpmTagType, rpmtransFlags, uint_16, uint_32, XFA_SKIPPING, xmalloc(), and xrealloc().

    Referenced by rpmRunTransactions().  

    void handleOverlappedFiles (TFI_t fi, hashTable ht, rpmProblemSet probs, struct diskspaceInfo * dsl) [static]

    Update disk space needs on each partition for this package.

    Definition at line 1035 of file transaction.c.

    References transactionFileInfo_s::actions, transactionFileInfo_s::ap, BLOCK_ROUND, diskspaceInfo::bneeded, diskspaceInfo::bsize, diskspaceInfo::dev, FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, FA_SAVE, FA_SKIP, FA_UNKNOWN, transactionFileInfo_s::fc, filecmp(), transactionFileInfo_s::fmodes, FP_EQUAL, transactionFileInfo_s::fps, transactionFileInfo_s::fsizes, availablePackage::h, htGetEntry(), diskspaceInfo::ineeded, mdfile(), psAppend(), RPMFILE_CONFIG, RPMFILE_NOREPLACE, RPMFILE_STATE_NORMAL, RPMPROB_NEW_FILE_CONFLICT, stpcpy(), transactionFileInfo_s::type, uint_32, XFA_SKIPPING, and xrealloc().

    Referenced by rpmRunTransactions().  

    int handleRmvdInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo * shared, int sharedCount) [static]

    Definition at line 994 of file transaction.c.

    References FA_SKIP, HGE_t, rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbInitIterator(), rpmdbNextIterator(), RPMFILE_STATE_NORMAL, and RPMTAG_FILESTATES.

    Referenced by rpmRunTransactions().  

    int osOkay (Header h) [static]

    Definition at line 234 of file transaction.c.

    References headerGetEntry(), RPM_INT8_TYPE, RPM_MACHTABLE_INSTOS, rpmMachineScore(), and RPMTAG_OS.

    Referenced by rpmRunTransactions().  

    void psAppend (rpmProblemSet probs, rpmProblemType type, const struct availablePackage * alp, const char * dn, const char * bn, Header altH, unsigned long ulong1) [static]

    Definition at line 139 of file transaction.c.

    References rpmProblem_s::altNEVR, rpmProblem_s::h, headerLink(), headerNVR(), rpmProblem_s::ignoreProblem, rpmProblem_s::key, rpmProblem_s::pkgNEVR, rpmProblemType, stpcpy(), rpmProblem_s::str1, rpmProblem_s::type, rpmProblem_s::ulong1, xmalloc(), and xrealloc().

    Referenced by ensureOlder(), handleInstInstalledFiles(), handleOverlappedFiles(), relocateFileList(), and rpmRunTransactions().  

    rpmProblemSet psCreate (void) [static]

    Definition at line 127 of file transaction.c.

    References rpmProblemSet_s::numProblems, rpmProblemSet_s::numProblemsAlloced, rpmProblemSet_s::probs, and xmalloc().

    Referenced by rpmRunTransactions().  

    int psTrim (rpmProblemSet filter, rpmProblemSet target) [static]

    Definition at line 737 of file transaction.c.

    References rpmProblem_s::h, rpmProblem_s::ignoreProblem, rpmProblem_s::key, rpmProblem_s::str1, rpmProblem_s::type, and XSTRCMP.

    Referenced by rpmRunTransactions().  

    Header relocateFileList (const rpmTransactionSet ts, TFI_t fi, struct availablePackage * alp, Header origH, fileAction * actions) [static]

    Relocate files in header.

    Todo: multilib file dispositions need to be checked.

    Parameters:

    ts
    transaction set
    fi
    transaction element file info
    alp
    available package
    origH
    package header
    actions
    file dispositions

    Returns: header with relocated files

    Definition at line 313 of file transaction.c.

    References _, _free(), alloca(), alloca_strdup, FA_SKIPMULTILIB, FA_SKIPNSTATE, fileAction, fileTypes, ftstring(), HAE_t, headerCopy(), headerIsEntry(), headerLink(), HFD_t, HGE_t, HME_t, int_32, isFileMULTILIB, rpmRelocation_s::newPath, rpmRelocation_s::oldPath, psAppend(), RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, RPMMESS_DEBUG, rpmMessage, RPMPROB_BADRELOCATE, RPMPROB_FILTER_FORCERELOCATE, RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILEFLAGS, RPMTAG_FILEMODES, RPMTAG_INSTPREFIXES, RPMTAG_ORIGBASENAMES, RPMTAG_ORIGDIRINDEXES, RPMTAG_ORIGDIRNAMES, RPMTAG_PREFIXES, rpmTagType, stpcpy(), stripTrailingChar(), uint_16, uint_32, whatis(), XDIR, xmalloc(), and xrealloc().

    Referenced by rpmRunTransactions().  

    void rpmProblemSetFree (rpmProblemSet probs)

    Destroy problem set.

    Parameters:

    probs
    problem set

    Definition at line 259 of file transaction.c.

    References _free(), rpmProblem_s::altNEVR, rpmProblem_s::h, headerFree(), rpmProblemSet_s::numProblems, rpmProblem_s::pkgNEVR, rpmProblemSet_s::probs, and rpmProblem_s::str1.

    Referenced by rpmInstall(), rpmRollback(), and rpmtransRun().  

    int sharedCmp (const void * one, const void * two) [static]

    Definition at line 774 of file transaction.c.

    References sharedFileInfo::otherPkg.

    Referenced by rpmRunTransactions().  

    void skipFiles (const rpmTransactionSet ts, TFI_t fi) [static]

    Definition at line 1253 of file transaction.c.

    References _, _free(), alloca(), FA_SKIPNETSHARED, FA_SKIPNSTATE, freeSplitString(), rpmExpand(), rpmExpandNumeric(), RPMFILE_DOC, RPMMESS_DEBUG, rpmMessage, RPMTRANS_FLAG_NODOCS, splitString(), whatis(), XDIR, and XFA_SKIPPING.

    Referenced by rpmRunTransactions().  

    void* tsFreeIterator (const void * a) [static]

    Destroy transaction element iterator.

    Parameters:

    a
    transaction element iterator

    Returns: NULL always

    Definition at line 1468 of file transaction.c.

    References _free().

    Referenced by rpmRunTransactions().  

    struct availablePackage* tsGetAlp (void * a) [static]

    Return transaction element available package pointer.

    Parameters:

    a
    transaction element iterator

    Returns: available package pointer

    Definition at line 1447 of file transaction.c.

    References rpmTransactionSet_s::addedPackages, rpmTransactionSet_s::flList, availableList_s::list, tsIterator_s::ocsave, rpmTransactionSet_s::order, tsIterator_s::ts, transactionFileInfo_s::type, and transactionElement_s::u.

    Referenced by rpmRunTransactions().  

    int tsGetOc (void * a) [static]

    Return transaction element order count.

    Parameters:

    a
    transaction element iterator

    Returns: element order count

    Definition at line 1434 of file transaction.c.

    References tsIterator_s::ocsave.

    Referenced by rpmRunTransactions().  

    void* tsInitIterator (const void * a) [static]

    Create transaction element iterator.

    Parameters:

    a
    transaction set

    Returns: transaction element iterator

    Definition at line 1479 of file transaction.c.

    References tsIterator_s::oc, tsIterator_s::ocsave, rpmTransactionSet_s::orderCount, tsIterator_s::reverse, RPMTRANS_FLAG_REVERSE, rpmTransactionSet_s::transFlags, tsIterator_s::ts, and xcalloc().

    Referenced by rpmRunTransactions().  

    TFI_t tsNextIterator (void * a) [static]

    Return next transaction element's file info.

    Parameters:

    a
    file info iterator

    Returns: next index, -1 on termination

    Definition at line 1498 of file transaction.c.

    References rpmTransactionSet_s::flList, tsIterator_s::oc, tsIterator_s::ocsave, rpmTransactionSet_s::orderCount, tsIterator_s::reverse, and tsIterator_s::ts.

    Referenced by rpmRunTransactions().  

    fileTypes whatis (uint_16 mode) [static]

    Definition at line 289 of file transaction.c.

    References BDEV, CDEV, fileTypes, LINK, PIPE, REG, S_ISLNK, S_ISSOCK, SOCK, uint_16, and XDIR.

    Referenced by decideFileFate(), filecmp(), relocateFileList(), and skipFiles().  

    AUTHOR

    Generated automatically by Doxygen for rpm from the source code.


     

    Index

    NAME
    SYNOPSIS
    Data Structures
    Defines
    Functions
    DETAILED DESCRIPTION
    DEFINE DOCUMENTATION
    #define adj_fs_blocks(_nb) (((_nb) * 21) / 20)
    #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s))
    #define BLOCK_ROUND(size, block) (((size) + (block) - 1) / (block))
    #define MNT_DEV_PREFIX '/mnt/'
    #define MNT_DEV_PREFIX_LENGTH (sizeof(MNT_DEV_PREFIX)-1)
    #define NOTIFY(_ts, _al) if ((_ts)->notify) (void) (_ts)->notify _al
    #define XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b))))
    FUNCTION DOCUMENTATION
    int archOkay (Header h) [static]
    fileAction decideFileFate (const char * dirName, const char * baseName, short dbMode, const char * dbMd5, const char * dbLink, short newMode, const char * newMd5, const char * newLink, int newFlags, rpmtransFlags transFlags) [static]
    int ensureOlder (struct availablePackage * alp, Header old, rpmProblemSet probs) [static]
    int filecmp (short mode1, const char * md51, const char * link1, short mode2, const char * md52, const char * link2) [static]
    void* freeFl (rpmTransactionSet ts, TFI_t flList) [static]
    const char* const ftstring (fileTypes ft) [static]
    int handleInstInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo * shared, int sharedCount, int reportConflicts, rpmProblemSet probs, rpmtransFlags transFlags) [static]
    void handleOverlappedFiles (TFI_t fi, hashTable ht, rpmProblemSet probs, struct diskspaceInfo * dsl) [static]
    int handleRmvdInstalledFiles (TFI_t fi, rpmdb db, struct sharedFileInfo * shared, int sharedCount) [static]
    int osOkay (Header h) [static]
    void psAppend (rpmProblemSet probs, rpmProblemType type, const struct availablePackage * alp, const char * dn, const char * bn, Header altH, unsigned long ulong1) [static]
    rpmProblemSet psCreate (void) [static]
    int psTrim (rpmProblemSet filter, rpmProblemSet target) [static]
    Header relocateFileList (const rpmTransactionSet ts, TFI_t fi, struct availablePackage * alp, Header origH, fileAction * actions) [static]
    void rpmProblemSetFree (rpmProblemSet probs)
    int sharedCmp (const void * one, const void * two) [static]
    void skipFiles (const rpmTransactionSet ts, TFI_t fi) [static]
    void* tsFreeIterator (const void * a) [static]
    struct availablePackage* tsGetAlp (void * a) [static]
    int tsGetOc (void * a) [static]
    void* tsInitIterator (const void * a) [static]
    TFI_t tsNextIterator (void * a) [static]
    fileTypes whatis (uint_16 mode) [static]
    AUTHOR


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




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

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