#include "system.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 "rpmcli.h"
Go to the source code of this file.
Defines | |
#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 amount, const unsigned long total, fnpyKey key, void *data) |
The rpm CLI generic transaction callback handler. | |
static int | archOkay (const char *pkgArch) |
static int | osOkay (const char *pkgOs) |
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 | _rpmtsRollback (rpmts rollbackTransaction) |
This is not a generalized function to be called from outside librpm. | |
static rpmRC | getRepackageHeaderFromTE (rpmts ts, rpmte te, Header *hdrp, const char **fnp) |
Get the repackaged header and filename from the repackage directory. | |
static rpmRC | _rpmtsAddRollbackElement (rpmts rollbackTransaction, rpmts runningTransaction, rpmte te) |
This is not a generalized function to be called from outside librpm. | |
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 19 of file transaction.c. |
|
Definition at line 22 of file transaction.c. |
|
Definition at line 25 of file transaction.c. |
|
Definition at line 288 of file transaction.c. Referenced by findFps(), and fpsCompare(). |
|
Definition at line 1389 of file transaction.c. Referenced by rpmtsRun(). |
|
This is not a generalized function to be called from outside librpm. It is called internally by rpmtsRun() to add elements to its autorollback transaction.
Definition at line 1239 of file transaction.c. References _, getRepackageHeaderFromTE(), headerFree(), headerLink(), rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbNextIterator(), RPMMESS_DEBUG, RPMMESS_FATALERROR, rpmMessage, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmteDBInstance(), rpmteN(), rpmteNEVRA(), rpmteType(), rpmtsAddEraseElement(), rpmtsAddInstallElement(), rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsInitIterator(), TR_ADDED, and TR_REMOVED. Referenced by rpmtsRun(). |
|
This is not a generalized function to be called from outside librpm. It is called internally by rpmtsRun() to rollback a failed transaction.
Definition at line 975 of file transaction.c. References _, RPMMESS_ERROR, RPMMESS_NORMAL, rpmMessage, RPMPROB_FILTER_OLDPACKAGE, RPMPROB_FILTER_REPLACENEWFILES, RPMPROB_FILTER_REPLACEOLDFILES, RPMPROB_FILTER_REPLACEPKG, rpmpsFree(), rpmpsNumProblems(), rpmpsPrint(), rpmteType(), rpmtsCheck(), rpmtsFree(), rpmtsGetTid(), rpmtsiFree, rpmtsiInit, rpmtsiNext(), rpmtsOrder(), rpmtsProblems(), rpmtsRun(), TR_ADDED, and TR_REMOVED. Referenced by rpmtsRun(). |
|
Definition at line 75 of file transaction.c. References RPM_MACHTABLE_INSTARCH, and rpmMachineScore(). Referenced by ftsStashLatest(), and rpmtsRun(). |
|
Ensure that current package is newer than installed package.
Definition at line 668 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 348 of file transaction.c. References _fps_debug, _linear_fps_search, fingerPrint_s::baseName, fprintCacheEntry_s::dirName, fingerPrint_s::entry, FP_EQUAL, fpsCompare(), ISROOT, and fingerPrint_s::subDir. Referenced by handleOverlappedFiles(). |
|
Definition at line 293 of file transaction.c. References _fps_debug, alloca(), fingerPrint_s::baseName, fprintCacheEntry_s::dirName, fingerPrint_s::entry, ISROOT, stpcpy(), and fingerPrint_s::subDir. Referenced by findFps(). |
|
Get the repackaged header and filename from the repackage directory.
Definition at line 1100 of file transaction.c. References _, _free(), IDT_s::h, headerFree(), headerGetEntry(), headerLink(), IDTindex_s::idt, IDTXfree(), IDTXglob(), IDT_s::key, name, IDTindex_s::nidt, rpmExpand(), RPMMESS_DEBUG, rpmMessage, RPMRC_NOTFOUND, RPMRC_OK, RPMTAG_NAME, RPMTAG_REMOVETID, rpmteN(), rpmtsGetTid(), snprintf(), and IDT_s::val. Referenced by _rpmtsAddRollbackElement(). |
|
Definition at line 117 of file transaction.c. References _free(), FA_CREATE, FA_SKIPCOLOR, hGetNEVR(), rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbNextIterator(), rpmfiBN(), rpmfiCompare(), rpmfiDecideFate(), rpmfiDN(), rpmfiFColor(), rpmfiFFlags(), rpmfiFree(), rpmfiFSize(), rpmfiInit(), RPMFILE_CONFIG, RPMFILE_STATE_NORMAL, rpmfiNew(), rpmfiNext(), rpmfiSetFX(), RPMPROB_FILE_CONFLICT, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, rpmteColor(), rpmteKey(), rpmteNEVR(), RPMTRANS_FLAG_ALLFILES, rpmtsColor(), rpmtsFlags(), rpmtsInitIterator(), rpmtsProblems(), xcalloc(), XFA_SKIPPING, and xrealloc(). Referenced by rpmtsRun(). |
|
Update disk space needs on each partition for this package's files.
Definition at line 441 of file transaction.c. References fprintCacheEntry_s::dev, domd5(), fingerPrint_s::entry, FA_ALTNAME, FA_BACKUP, FA_CREATE, FA_ERASE, FA_SKIP, FA_SKIPCOLOR, FA_UNKNOWN, findFps(), htGetEntry(), recs, rpmfiCompare(), rpmfiFC(), rpmfiFColor(), rpmfiFFlags(), rpmfiFMode(), rpmfiFN(), rpmfiFSize(), rpmfiFState(), rpmfiInit(), RPMFILE_CONFIG, RPMFILE_NOREPLACE, RPMFILE_STATE_NORMAL, rpmfiMD5(), rpmfiNext(), rpmfiSetFX(), RPMPROB_FILTER_REPLACENEWFILES, RPMPROB_NEW_FILE_CONFLICT, rpmpsAppend(), rpmpsFree(), rpmteKey(), rpmteNEVR(), rpmteType(), rpmtsColor(), rpmtsFilterFlags(), rpmtsProblems(), rpmtsUpdateDSI(), TR_ADDED, TR_REMOVED, and XFA_SKIPPING. Referenced by rpmtsRun(). |
|
Definition at line 248 of file transaction.c. References FA_SKIP, rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbNextIterator(), RPMFILE_STATE_NORMAL, RPMTAG_FILESTATES, and rpmtsInitIterator(). Referenced by rpmtsRun(). |
|
Definition at line 84 of file transaction.c. References RPM_MACHTABLE_INSTOS, and rpmMachineScore(). Referenced by ftsStashLatest(), and rpmtsRun(). |
|
Return transaction element's file info.
Definition at line 949 of file transaction.c. References rpmtsElement(). Referenced by rpmtsRun(). |
|
Definition at line 93 of file transaction.c. Referenced by rpmtsRun(). |
|
Skip any files that do not match install policies.
Definition at line 721 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 291 of file transaction.c. |
|
Definition at line 346 of file transaction.c. Referenced by findFps(). |