#include "system.h"
#include <rpmcli.h>
#include "rpmdb.h"
#include "rpmds.h"
#include "rpmte.h"
#include "rpmts.h"
#include "manifest.h"
#include "misc.h"
#include "rpmgi.h"
#include "debug.h"
Include dependency graph for rpmrollback.c:
Go to the source code of this file.
Defines | |
#define | _RPMTE_INTERNAL |
#define | _RPMTS_INTERNAL |
Functions | |
static int | IDTintcmp (const void *a, const void *b) |
IDTX | IDTXfree (IDTX idtx) |
Destroy id index. | |
IDTX | IDTXnew (void) |
Create id index. | |
IDTX | IDTXgrow (IDTX idtx, int need) |
Insure that index has room for "need" elements. | |
IDTX | IDTXsort (IDTX idtx) |
Sort tag (instance,value) pairs. | |
IDTX | IDTXload (rpmts ts, rpmTag tag, uint_32 rbtid) |
Load tag (instance,value) pairs from rpm databse, and return sorted id index. | |
IDTX | IDTXglob (rpmts ts, const char *globstr, rpmTag tag, uint_32 rbtid) |
Load tag (instance,value) pairs from packages, and return sorted id index. | |
static int | cmpArgvStr (rpmts ts, const char *lname, const char **AV, int AC, const char *B) |
Search for string B in argv array AV. | |
static int | findErases (rpmts ts, rpmte p, unsigned thistid, IDT ip, int niids) |
Find (and add to transaction set) all erase elements with matching blink. | |
static int | rpmrbProblems (rpmts ts, const char *msg, int rc) |
int | rpmrbCheck (rpmts ts) |
int | rpmrbOrder (rpmts ts) |
int | rpmrbRun (rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) |
int | rpmRollback (rpmts ts, QVA_t ia, const char **argv) |
Rollback transactions, erasing new, reinstalling old, package(s). | |
Variables | |
static int | reverse = -1 |
Definition in file rpmrollback.c.
|
Definition at line 12 of file rpmrollback.c. |
|
Definition at line 14 of file rpmrollback.c. |
|
Search for string B in argv array AV.
Definition at line 234 of file rpmrollback.c. References RPMPROB_NOREPACKAGE, rpmpsAppend(), rpmpsFree(), and rpmtsProblems(). Referenced by findErases(), and markLinkedFailed(). |
|
Find (and add to transaction set) all erase elements with matching blink. In addition, recreate any added transaction element linkages. XXX rp->h should have FLINK{HDRID,PKGID,NEVRA} populated. XXX ip->h should have BLINK{HDRID,PKGID,NEVRA} populated. XXX p = ts->teInstall is added transaction element from rp->h.
Definition at line 279 of file rpmrollback.c. References cmpArgvStr(), IDT_s::done, IDT_s::h, headerFreeData(), headerGetEntryMinMemory(), IDT_s::instance, RPMMESS_DEBUG, rpmMessage, RPMTAG_BLINKHDRID, RPMTAG_BLINKNEVRA, RPMTAG_BLINKPKGID, RPMTE_CHAIN_END, rpmteChain(), rpmtsAddEraseElement(), IDT_s::u32, and IDT_s::val. Referenced by rpmRollback(). |
|
Definition at line 32 of file rpmrollback.c. References reverse. Referenced by IDTXsort(). |
|
Destroy id index.
Definition at line 40 of file rpmrollback.c. References _free(), IDT_s::h, headerFree(), IDTindex_s::idt, and IDTindex_s::nidt. |
|
Load tag (instance,value) pairs from packages, and return sorted id index.
Definition at line 138 of file rpmrollback.c. References _, _free(), IDT_s::done, Fclose(), Ferror(), Fopen(), Fstrerror(), IDT_s::h, headerFree(), headerGetEntry(), headerGetOrigin(), headerIsEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDT_s::instance, IDT_s::key, IDTindex_s::nidt, RPMERR_OPEN, rpmError, rpmgiEscapeSpaces(), rpmGlob(), RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_SOURCERPM, IDT_s::u32, and IDT_s::val. Referenced by rpmRollback(), and rpmts_IDTXglob(). |
|
Insure that index has room for "need" elements.
Definition at line 64 of file rpmrollback.c. References IDTindex_s::alloced, IDTindex_s::delta, IDTindex_s::idt, IDTXnew(), IDTindex_s::nidt, IDTindex_s::size, and xrealloc(). Referenced by IDTXglob(), and IDTXload(). |
|
Load tag (instance,value) pairs from rpm databse, and return sorted id index.
Definition at line 88 of file rpmrollback.c. References IDT_s::done, IDT_s::h, headerGetEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, IDT_s::key, IDTindex_s::nidt, RPM_INT32_TYPE, RPM_NULL_TYPE, rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbNextIterator(), rpmdbSetIteratorRE(), RPMTAG_NAME, rpmtsInitIterator(), IDT_s::u32, and IDT_s::val. Referenced by rpmRollback(), and rpmts_IDTXload(). |
|
Create id index.
Definition at line 56 of file rpmrollback.c. References xcalloc(). Referenced by IDTXgrow(). |
|
Sort tag (instance,value) pairs.
Definition at line 81 of file rpmrollback.c. References IDTindex_s::idt, IDTintcmp(), IDTindex_s::nidt, and IDTindex_s::size. Referenced by IDTXload(). |
|
Definition at line 387 of file rpmrollback.c. References N_, rpmrbProblems(), and rpmtsCheck(). Referenced by main(). |
|
Definition at line 392 of file rpmrollback.c. References N_, rpmrbProblems(), and rpmtsOrder(). Referenced by main(). |
|
Definition at line 374 of file rpmrollback.c. References RPMMESS_ERROR, rpmMessage, rpmpsFree(), rpmpsNumProblems(), rpmpsPrint(), and rpmtsProblems(). Referenced by rpmrbCheck(), rpmrbOrder(), rpmrbRun(), and rpmRollback(). |
|
Definition at line 397 of file rpmrollback.c. References N_, rpmrbProblems(), and rpmtsRun(). Referenced by main(). |
|
Definition at line 28 of file rpmrollback.c. |