rpm  5.4.15
Typedefs | Functions
rpmrollback.h File Reference
#include <rpmcli.h>
Include dependency graph for rpmrollback.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct IDT_s * IDT
 
typedef struct IDTindex_s * IDTX
 

Functions

IDTX IDTXfree (IDTX idtx)
 Destroy id index. More...
 
IDTX IDTXnew (void)
 Create id index. More...
 
IDTX IDTXgrow (IDTX idtx, int need)
 Insure that index has room for "need" elements. More...
 
IDTX IDTXsort (IDTX idtx)
 Sort tag (instance,value) pairs. More...
 
IDTX IDTXload (rpmts ts, rpmTag tag, rpmuint32_t rbtid)
 Load tag (instance,value) pairs from rpm databse, and return sorted id index. More...
 
IDTX IDTXglob (rpmts ts, const char *globstr, rpmTag tag, rpmuint32_t rbtid)
 Load tag (instance,value) pairs from packages, and return sorted id index. More...
 
int rpmRollback (rpmts ts, QVA_t ia, const char **argv)
 Rollback transactions, erasing new, reinstalling old, package(s). More...
 

Typedef Documentation

typedef struct IDT_s* IDT

Definition at line 13 of file rpmrollback.h.

typedef struct IDTindex_s* IDTX

Definition at line 17 of file rpmrollback.h.

Function Documentation

IDTX IDTXfree ( IDTX  idtx)

Destroy id index.

Parameters
idtxid index
Returns
NULL always

Definition at line 74 of file rpmrollback.c.

References _free(), headerFree(), and i.

Referenced by rpmRollback(), rpmts_IDTXglob(), and rpmts_IDTXload().

IDTX IDTXglob ( rpmts  ts,
const char *  globstr,
rpmTag  tag,
rpmuint32_t  rbtid 
)

Load tag (instance,value) pairs from packages, and return sorted id index.

Parameters
tstransaction set
globstrglob expression
tagrpm tag
rbtidrollback goal
Returns
id index

Definition at line 172 of file rpmrollback.c.

References _, _free(), alloca(), Fclose(), Ferror(), Fopen(), Fstrerror(), headerFree(), headerGet(), headerGetOrigin(), headerIsEntry(), headerLink(), i, IDTXgrow(), IDTXsort(), _HE_s::p, rpmDataType_u::ptr, rpmgiEscapeSpaces(), rpmGlob(), rpmlog(), RPMLOG_ERR, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_ARCH, RPMTAG_SOURCERPM, _HE_s::tag, and rpmDataType_u::ui32p.

Referenced by rpmRollback(), and rpmts_IDTXglob().

IDTX IDTXgrow ( IDTX  idtx,
int  need 
)

Insure that index has room for "need" elements.

Parameters
idtxid index
needadditional no. of elements needed
Returns
id index (with room for "need" elements)

Definition at line 99 of file rpmrollback.c.

References IDTXnew(), and xrealloc.

Referenced by IDTXglob(), and IDTXload().

IDTX IDTXload ( rpmts  ts,
rpmTag  tag,
rpmuint32_t  rbtid 
)

Load tag (instance,value) pairs from rpm databse, and return sorted id index.

Parameters
tstransaction set
tagrpm tag
rbtidrollback goal
Returns
id index

Definition at line 123 of file rpmrollback.c.

References _free(), alloca(), headerGet(), headerLink(), IDTXgrow(), IDTXsort(), _HE_s::p, rpmDataType_u::ptr, rpmmiAddPattern(), rpmmiFree(), rpmmiInstance(), rpmmiNext(), RPMMIRE_DEFAULT, RPMTAG_NAME, rpmtsInitIterator(), _HE_s::tag, and rpmDataType_u::ui32p.

Referenced by rpmRollback(), and rpmts_IDTXload().

IDTX IDTXnew ( void  )

Create id index.

Returns
new id index

Definition at line 91 of file rpmrollback.c.

References xcalloc().

Referenced by IDTXgrow().

IDTX IDTXsort ( IDTX  idtx)

Sort tag (instance,value) pairs.

Parameters
idtxid index
Returns
id index

Definition at line 116 of file rpmrollback.c.

References IDTintcmp().

Referenced by IDTXglob(), and IDTXload().

int rpmRollback ( rpmts  ts,
QVA_t  ia,
const char **  argv 
)