#include "system.h"
#include "rpmcli.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "fsm.h"
#include "psm.h"
#include "rpmdb.h"
#include "rpmds.h"
#include "rpmlock.h"
#include "rpmfi.h"
#include "rpmte.h"
#include "rpmts.h"
#include "cpio.h"
#include "fprint.h"
#include "legacy.h"
#include "misc.h"
#include "debug.h"
Include dependency graph for transaction.c:
Go to the source code of this file.
Defines | |
#define | _RPMDB_INTERNAL |
#define | _RPMFI_INTERNAL |
#define | _RPMTE_INTERNAL |
#define | _RPMTS_INTERNAL |
#define | ISROOT(_d) (((_d)[0] == '/' && (_d)[1] == '\0') ? "" : (_d)) |
#define | NOTIFY(_ts, _al) /*@i@*/ if ((_ts)->notify) (void) (_ts)->notify _al |
Functions | |
void * | rpmShowProgress (const void *arg, const rpmCallbackType what, const unsigned long long amount, const unsigned long long total, fnpyKey key, void *data) |
The rpm CLI generic transaction callback handler. | |
static int | sharedCmp (const void *one, const void *two) |
static int | handleInstInstalledFiles (const rpmts ts, rpmte p, rpmfi fi, sharedFileInfo shared, int sharedCount, int reportConflicts) |
static int | handleRmvdInstalledFiles (const rpmts ts, rpmfi fi, sharedFileInfo shared, int sharedCount) |
static int | fpsCompare (const void *one, const void *two) |
static int | findFps (const struct fingerPrint_s *fiFps, const struct fingerPrint_s *otherFps, int otherFc) |
static void | handleOverlappedFiles (const rpmts ts, const rpmte p, rpmfi fi) |
Update disk space needs on each partition for this package's files. | |
static int | ensureOlder (rpmts ts, const rpmte p, const Header h) |
Ensure that current package is newer than installed package. | |
static void | skipFiles (const rpmts ts, rpmfi fi) |
Skip any files that do not match install policies. | |
static rpmfi | rpmtsiFi (const rpmtsi tsi) |
Return transaction element's file info. | |
static rpmRC | _processFailedPackage (rpmts ts, rpmte p) |
Force add a failed package into the rpmdb. | |
rpmRC | rpmtsRollback (rpmts rbts, rpmprobFilterFlags ignoreSet, int running, rpmte rbte) |
Rollback a failed transaction. | |
static int | cmpArgvStr (const char **AV, const char *B) |
Search for string B in argv array AV. | |
static int | markLinkedFailed (rpmts ts, rpmte p) |
Mark all erasure elements linked to installed element p as failed. | |
int | rpmtsRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) |
Process all package elements in a transaction set. | |
Variables | |
int | _fps_debug = 0 |
static int | _linear_fps_search = 0 |
Definition in file transaction.c.
|
Definition at line 14 of file transaction.c. |
|
Definition at line 21 of file transaction.c. |
|
Definition at line 24 of file transaction.c. |
|
Definition at line 27 of file transaction.c. |
|
Definition at line 299 of file transaction.c. |
|
Definition at line 1149 of file transaction.c. Referenced by rpmtsRun(). |
|
Force add a failed package into the rpmdb.
Definition at line 938 of file transaction.c. References PSM_RPMDB_ADD, rpmpsmFree(), rpmpsmNew(), rpmpsmStage(), RPMRC_OK, rpmteType(), rpmpsm_s::stepName, and TR_ADDED. Referenced by rpmtsRollback(). |
|
Search for string B in argv array AV.
Definition at line 1094 of file transaction.c. |
|
Ensure that current package is newer than installed package.
Definition at line 628 of file transaction.c. References _free(), _rpmds_nopromote, alloca(), hGetNEVR(), rpmdsFree(), rpmdsNVRMatchesDep(), rpmdsSingle(), RPMPROB_OLDPACKAGE, rpmpsAppend(), rpmpsFree(), RPMSENSE_EQUAL, RPMSENSE_LESS, RPMTAG_REQUIRENAME, rpmteE(), rpmteKey(), rpmteN(), rpmteNEVR(), rpmteR(), rpmteV(), rpmtsProblems(), and stpcpy(). Referenced by rpmtsRun(). |
|
Definition at line 345 of file transaction.c. References _linear_fps_search, FP_EQUAL, and fpsCompare(). Referenced by handleOverlappedFiles(). |
|
Definition at line 304 of file transaction.c. References alloca(), fingerPrint_s::baseName, fprintCacheEntry_s::dirName, fingerPrint_s::entry, stpcpy(), and fingerPrint_s::subDir. Referenced by findFps(). |
|
Definition at line 95 of file transaction.c. References _free(), CPIO_SBIT_CHECK, FA_CREATE, FA_SKIPCOLOR, hGetNEVRA(), Lstat(), rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbNextIterator(), rpmfiBN(), rpmfiCompare(), rpmfiDecideFate(), rpmfiDN(), rpmfiFColor(), rpmfiFFlags(), rpmfiFMode(), rpmfiFN(), rpmfiFree(), rpmfiFSize(), rpmfiInit(), RPMFILE_CONFIG, RPMFILE_EXISTS, RPMFILE_GHOST, RPMFILE_SPARSE, RPMFILE_STATE_NORMAL, rpmfiNew(), rpmfiNext(), rpmfiSetFFlags(), rpmfiSetFX(), RPMPROB_FILE_CONFLICT, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, rpmteColor(), rpmteKey(), rpmteNEVRA(), RPMTRANS_FLAG_ALLFILES, rpmtsColor(), rpmtsFlags(), rpmtsInitIterator(), rpmtsPrefColor(), rpmtsProblems(), xcalloc(), XFA_SKIPPING, and xrealloc(). Referenced by rpmtsRun(). |
|
Update disk space needs on each partition for this package's files.
Definition at line 395 of file transaction.c. References _free(), fprintCacheEntry_s::dev, dodigest(), fingerPrint_s::entry, FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, FA_SKIP, FA_SKIPCOLOR, FA_UNKNOWN, findFps(), htGetEntry(), recs, rpmfiCompare(), rpmfiDigest(), rpmfiFC(), rpmfiFColor(), rpmfiFFlags(), rpmfiFMode(), rpmfiFN(), rpmfiFSize(), rpmfiFState(), rpmfiInit(), RPMFILE_CONFIG, RPMFILE_EXISTS, RPMFILE_NOREPLACE, RPMFILE_SPARSE, RPMFILE_STATE_NORMAL, rpmfiNext(), rpmfiSetFX(), RPMPROB_FILTER_REPLACENEWFILES, RPMPROB_NEW_FILE_CONFLICT, rpmpsAppend(), rpmpsFree(), rpmteKey(), rpmteNEVR(), rpmteType(), rpmtsColor(), rpmtsFilterFlags(), rpmtsPrefColor(), rpmtsProblems(), rpmtsUpdateDSI(), TR_ADDED, TR_REMOVED, xcalloc(), and XFA_SKIPPING. Referenced by rpmtsRun(). |
|
Definition at line 257 of file transaction.c. References FA_SKIP, rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbNextIterator(), RPMFILE_STATE_NORMAL, RPMTAG_FILESTATES, and rpmtsInitIterator(). Referenced by rpmtsRun(). |
|
Mark all erasure elements linked to installed element p as failed.
Definition at line 1114 of file transaction.c. References cmpArgvStr(), rpmtsiFree, rpmtsiInit, rpmtsiNext(), and TR_REMOVED. Referenced by rpmtsRun(). |
|
Return transaction element's file info.
Definition at line 912 of file transaction.c. References rpmtsElement(). Referenced by rpmtsRun(). |
|
Definition at line 70 of file transaction.c. Referenced by rpmtsRun(). |
|
Skip any files that do not match install policies.
Definition at line 683 of file transaction.c. References _, _free(), alloca(), FA_SKIPCOLOR, FA_SKIPNETSHARED, FA_SKIPNSTATE, freeSplitString(), lang, rpmExpand(), rpmExpandNumeric(), rpmfiBN(), rpmfiDC(), rpmfiDN(), rpmfiDX(), rpmfiFColor(), rpmfiFFlags(), rpmfiFMode(), rpmfiInit(), rpmfiInitD(), RPMFILE_CONFIG, RPMFILE_DOC, rpmfiNext(), rpmfiNextD(), RPMMESS_DEBUG, rpmMessage, RPMTRANS_FLAG_NOCONFIGS, RPMTRANS_FLAG_NODOCS, rpmtsColor(), rpmtsFlags(), splitString(), whatis(), XDIR, and XFA_SKIPPING. Referenced by rpmtsRun(). |
|
Definition at line 302 of file transaction.c. |
|
Definition at line 343 of file transaction.c. Referenced by findFps(). |