|
rpm 5.3.12
|
#include "system.h"#include <rpmio.h>#include <rpmiotypes.h>#include <rpmcb.h>#include <argv.h>#include <rpmtypes.h>#include <rpmtag.h>#include <pkgio.h>#include <rpmdb.h>#include <rpmds.h>#include "manifest.h"#include "misc.h"#include <rpmgi.h>#include <rpmcli.h>#include <rpmrollback.h>#include "debug.h"
Go to the source code of this file.
Defines | |
| #define | _RPMTE_INTERNAL |
| #define | _RPMTS_INTERNAL |
| #define | _RPMTS_PRINT |
| #define | _RPMROLLBACK_INTERNAL |
Functions | |
| static int | IDTintcmp (const void *a, const void *b) |
| IDTX | IDTXfree (IDTX idtx) |
| IDTX | IDTXnew (void) |
| IDTX | IDTXgrow (IDTX idtx, int need) |
| IDTX | IDTXsort (IDTX idtx) |
| IDTX | IDTXload (rpmts ts, rpmTag tag, rpmuint32_t rbtid) |
| IDTX | IDTXglob (rpmts ts, const char *globstr, rpmTag tag, rpmuint32_t rbtid) |
| 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. | |
| int | rpmRollback (rpmts ts, QVA_t ia, const char **argv) |
Variables | |
| static int | reverse = -1 |
Definition in file rpmrollback.c.
| #define _RPMROLLBACK_INTERNAL |
Definition at line 27 of file rpmrollback.c.
| #define _RPMTE_INTERNAL |
Definition at line 21 of file rpmrollback.c.
| #define _RPMTS_INTERNAL |
Definition at line 22 of file rpmrollback.c.
| #define _RPMTS_PRINT |
Definition at line 23 of file rpmrollback.c.
| static int cmpArgvStr | ( | rpmts | ts, |
| const char * | lname, | ||
| const char ** | AV, | ||
| int | AC, | ||
| const char * | B | ||
| ) | [static] |
Search for string B in argv array AV.
| ts | transaction set |
| lname | type of link |
| AV | argv array |
| AC | no. of args |
| B | string |
Definition at line 247 of file rpmrollback.c.
References RPMPROB_NOREPACKAGE, rpmpsAppend(), rpmpsFree(), and rpmtsProblems().
Referenced by findErases().
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.
| ts | transaction set (ts->teInstall set to last added pkg) |
| p | most recently added install element (NULL skips linking) |
| thistid | current transaction id |
| ip | currently installed package(s) to be erased |
| niids | no. of currently installed package(s) |
< End of chain marker.
Definition at line 292 of file rpmrollback.c.
References _free(), alloca(), rpmDataType_u::argv, _HE_s::c, cmpArgvStr(), D_, headerGet(), _HE_s::p, rpmlog(), RPMLOG_DEBUG, RPMTE_CHAIN_END, rpmteChain(), rpmtsAddEraseElement(), and _HE_s::tag.
Referenced by rpmRollback().
| static int IDTintcmp | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
| IDTX IDTXfree | ( | IDTX | idtx | ) |
Definition at line 51 of file rpmrollback.c.
References _free(), and headerFree().
Referenced by rpmRollback(), rpmts_IDTXglob(), and rpmts_IDTXload().
| IDTX IDTXglob | ( | rpmts | ts, |
| const char * | globstr, | ||
| rpmTag | tag, | ||
| rpmuint32_t | rbtid | ||
| ) |
Definition at line 149 of file rpmrollback.c.
References _, _free(), alloca(), Fclose(), Ferror(), Fopen(), Fstrerror(), headerFree(), headerGet(), headerGetOrigin(), headerIsEntry(), headerLink(), IDTXgrow(), IDTXsort(), _HE_s::p, rpmDataType_u::ptr, rpmgiEscapeSpaces(), rpmGlob(), rpmlog(), RPMLOG_ERR, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by rpmRollback(), and rpmts_IDTXglob().
| IDTX IDTXgrow | ( | IDTX | idtx, |
| int | need | ||
| ) |
Definition at line 76 of file rpmrollback.c.
References IDTXnew(), and xrealloc().
Referenced by IDTXglob(), and IDTXload().
| IDTX IDTXload | ( | rpmts | ts, |
| rpmTag | tag, | ||
| rpmuint32_t | rbtid | ||
| ) |
Definition at line 100 of file rpmrollback.c.
References _free(), alloca(), headerGet(), headerLink(), IDTXgrow(), IDTXsort(), _HE_s::p, rpmDataType_u::ptr, rpmmiAddPattern(), rpmmiFree(), rpmmiInstance(), rpmmiNext(), RPMMIRE_DEFAULT, rpmtsInitIterator(), _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by rpmRollback(), and rpmts_IDTXload().
| IDTX IDTXnew | ( | void | ) |
| IDTX IDTXsort | ( | IDTX | idtx | ) |
Definition at line 93 of file rpmrollback.c.
References IDTintcmp().
Referenced by IDTXglob(), and IDTXload().
Definition at line 398 of file rpmrollback.c.
References _, _free(), _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, D_, rpmQVKArguments_s::depFlags, findErases(), headerFree(), IDTXfree(), IDTXglob(), IDTXload(), INSTALL_ERASE, INSTALL_FRESHEN, INSTALL_INSTALL, INSTALL_LABEL, INSTALL_UPGRADE, rpmQVKArguments_s::installInterfaceFlags, rpmQVKArguments_s::no_rollback_links, rpmQVKArguments_s::numrbtidExcludes, rpmQVKArguments_s::probFilter, rpmQVKArguments_s::qva_flags, rpmQVKArguments_s::rbCheck, rpmQVKArguments_s::rbOrder, rpmQVKArguments_s::rbRun, rpmQVKArguments_s::rbtid, rpmQVKArguments_s::rbtidExcludes, rpmQVKArguments_s::relocations, rpmcliInstallProblems(), rpmcliPackagesTotal, rpmExpand(), rpmExpandNumeric(), rpmIsDebug, rpmIsVerbose, rpmlog(), RPMLOG_DEBUG, RPMLOG_NOTICE, RPMPROB_FILTER_OLDPACKAGE, rpmpsFree(), rpmShowProgress(), RPMTRANS_TYPE_ROLLBACK, rpmtsAddInstallElement(), rpmtsClean(), rpmtsEmpty(), rpmtsSetDFlags(), rpmtsSetFlags(), rpmtsSetNotifyCallback(), rpmtsSetType(), rpmtsSetVSFlags(), RPMVSF_NEEDPAYLOAD, RPMVSF_NOHDRCHK, rpmQVKArguments_s::transFlags, VERIFY_DIGEST, VERIFY_HDRCHK, VERIFY_SIGNATURE, and vsflags.
Referenced by main(), rpmts_Rollback(), and rpmtsRollback().
int reverse = -1 [static] |
Definition at line 39 of file rpmrollback.c.
Referenced by IDTintcmp().
1.7.4