lib/rpmcli.h File Reference

#include "rpmlib.h"
#include "rpmurl.h"
#include "rpmmacro.h"
#include "argv.h"

Go to the source code of this file.

Data Structures

struct  rpmQVKArguments_s
 Describe query/verify/signature command line operation. More...
struct  rpmBuildArguments_s
 Describe build command line request. More...
struct  rpmInstallArguments_s
 Describe database command line requests. More...
struct  IDT_s
 A rollback transaction id element. More...
struct  IDTindex_s
 A rollback transaction id index. More...
struct  rpmDatabaseArguments_s
 Describe database command line requests. More...

Defines

#define RPMCLI_POPT_NODEPS   -1025
 Common/global popt tokens used for command line option tables.
#define RPMCLI_POPT_FORCE   -1026
#define RPMCLI_POPT_NOMD5   -1027
#define RPMCLI_POPT_NOSCRIPTS   -1028
#define RPMCLI_POPT_NOSIGNATURE   -1029
#define RPMCLI_POPT_NODIGEST   -1030
#define RPMCLI_POPT_NOHDRCHK   -1031
#define RPMCLI_POPT_NOCONTEXTS   -1032

Functions

poptContext rpmcliInit (int argc, char *const argv[], struct poptOption *optionsTable)
 Initialize most everything needed by an rpm CLI executable context.
void rpmcliConfigured (void)
 Make sure that rpm configuration has been read.
poptContext rpmcliFini (poptContext optCon)
 Destroy most everything needed by an rpm CLI executable context.

Variables

int _noDirTokens
 Should version 3 packages be produced?
struct poptOption rpmcliAllPoptTable []
 Popt option table for options shared by all modes and executables.
int ftsOpts
struct poptOption rpmcliFtsPoptTable []
const char * rpmcliPipeOutput
const char * rpmcliRcfile
const char * rpmcliRootDir
RPMDB
struct rpmDatabaseArguments_s rpmDBArgs
struct poptOption rpmDatabasePoptTable []


Detailed Description

Definition in file rpmcli.h.


Define Documentation

#define _QUERY_FOR_BITS

#define RPMCLI_POPT_FORCE   -1026

Definition at line 85 of file rpmcli.h.

Referenced by buildArgCallback(), installArgCallback(), and queryArgCallback().

#define RPMCLI_POPT_NOCONTEXTS   -1032

Definition at line 91 of file rpmcli.h.

Referenced by installArgCallback(), and queryArgCallback().

#define RPMCLI_POPT_NODEPS   -1025

Common/global popt tokens used for command line option tables.

Definition at line 84 of file rpmcli.h.

Referenced by buildArgCallback(), installArgCallback(), and queryArgCallback().

#define RPMCLI_POPT_NODIGEST   -1030

#define RPMCLI_POPT_NOHDRCHK   -1031

#define RPMCLI_POPT_NOMD5   -1027

Definition at line 86 of file rpmcli.h.

Referenced by installArgCallback(), and queryArgCallback().

#define RPMCLI_POPT_NOSCRIPTS   -1028

Definition at line 87 of file rpmcli.h.

Referenced by installArgCallback(), and queryArgCallback().

#define RPMCLI_POPT_NOSIGNATURE   -1029

#define RPMVERIFY_ALL   ~(RPMVERIFY_NONE)

Definition at line 142 of file rpmcli.h.

Referenced by processPackageFiles(), and processSourceFiles().

#define RPMVERIFY_FAILURES   (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)

Definition at line 143 of file rpmcli.h.

Referenced by rpmVerifyFile().

#define VERIFY_ALL

Value:

Definition at line 226 of file rpmcli.h.

Referenced by main().

#define VERIFY_ATTRS


Typedef Documentation

typedef struct IDT_s * IDT

A rollback transaction id element.

typedef struct IDTindex_s * IDTX

A rollback transaction id index.


Function Documentation

IDTX IDTXfree ( IDTX  idtx  ) 

Destroy id index.

Parameters:
idtx id index
Returns:
NULL always

Definition at line 926 of file rpminstall.c.

References _free(), IDT_s::h, headerFree(), IDTindex_s::idt, IDT_s::key, and IDTindex_s::nidt.

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

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

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

Parameters:
ts transaction set
globstr glob expression
tag rpm tag
Returns:
id index

Definition at line 1021 of file rpminstall.c.

References _, _free(), Fclose(), rpmEIU::fd, Ferror(), Fopen(), Fstrerror(), IDT_s::h, rpmEIU::h, headerFree(), headerGetEntry(), headerIsEntry(), headerLink(), IDTindex_s::idt, IDTXgrow(), IDTXsort(), IDT_s::instance, rpmEIU::isSource, IDT_s::key, IDTindex_s::nidt, RPMERR_OPEN, rpmError, rpmGlob(), rpmEIU::rpmrc, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_SOURCEPACKAGE, IDT_s::u32, and IDT_s::val.

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

IDTX IDTXgrow ( IDTX  idtx,
int  need 
)

Insure that index has room for "need" elements.

Parameters:
idtx id index
need additional no. of elements needed
Returns:
id index (with room for "need" elements)

Definition at line 950 of file rpminstall.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().

IDTX IDTXload ( rpmts  ts,
rpmTag  tag 
)

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

Parameters:
ts transaction set
tag rpm tag
Returns:
id index

Definition at line 974 of file rpminstall.c.

References IDT_s::h, rpmEIU::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(), RPMMIRE_DEFAULT, RPMTAG_NAME, rpmtsInitIterator(), IDT_s::u32, and IDT_s::val.

Referenced by rpmRollback(), and rpmts_IDTXload().

IDTX IDTXnew ( void   ) 

Create id index.

Returns:
new id index

Definition at line 942 of file rpminstall.c.

References IDTindex_s::delta, IDTindex_s::size, and xcalloc().

Referenced by IDTXgrow().

IDTX IDTXsort ( IDTX  idtx  ) 

Sort tag (instance,value) pairs.

Parameters:
idtx id index
Returns:
id index

Definition at line 967 of file rpminstall.c.

References IDTindex_s::idt, IDTintcmp(), IDTindex_s::nidt, and IDTindex_s::size.

Referenced by IDTXglob(), and IDTXload().

void rpmcliConfigured ( void   ) 

Make sure that rpm configuration has been read.

Warning:
Options like --rcfile and --verbose must precede callers option.
Make sure that rpm configuration has been read.

Warning:
Options like --rcfile and --verbose must precede callers option.

Definition at line 136 of file poptALL.c.

References EXIT_FAILURE, rpmcliInitialized, rpmcliRcfile, and rpmReadConfigFiles().

Referenced by main(), rpmcliAllArgCallback(), and rpmcliInit().

poptContext rpmcliFini ( poptContext  optCon  ) 

Destroy most everything needed by an rpm CLI executable context.

Parameters:
optCon popt context
Returns:
NULL always

Definition at line 385 of file poptALL.c.

Referenced by main().

poptContext rpmcliInit ( int  argc,
char *const   argv[],
struct poptOption *  optionsTable 
)

Initialize most everything needed by an rpm CLI executable context.

Parameters:
argc no. of args
argv arg array
optionsTable popt option table
Returns:
popt context (or NULL)

Definition at line 400 of file poptALL.c.

References _, __progname, _debug, bindtextdomain, EXIT_FAILURE, LIBRPMALIAS_FILENAME, LOCALEDIR, PACKAGE, rpmcliConfigured(), RPMCONFIGDIR, rpmIncreaseVerbosity, RPMMESS_NORMAL, rpmSetVerbosity, setlocale, setprogname, and textdomain.

Referenced by main().

int rpmVerifySignatures ( QVA_t  qva,
rpmts  ts,
FD_t  fd,
const char *  fn 
)


Variable Documentation

int ftsOpts

Definition at line 234 of file poptALL.c.

Referenced by main(), and rpmcliArgIter().

struct poptOption rpmcliFtsPoptTable[]

Definition at line 237 of file poptALL.c.

Definition at line 27 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

Definition at line 29 of file rpminstall.c.

Referenced by printHash().

Definition at line 25 of file rpminstall.c.

Referenced by rpmInstall(), rpmRollback(), rpmShowProgress(), and rpmtsAddInstallElement().

const char* rpmcliPipeOutput

Definition at line 92 of file poptALL.c.

Referenced by main().

Definition at line 31 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

Definition at line 33 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

const char* rpmcliRcfile

Definition at line 95 of file poptALL.c.

Referenced by main(), and rpmcliConfigured().

const char* rpmcliRootDir

Definition at line 98 of file poptALL.c.

Referenced by main().


Generated on Mon Jul 20 09:44:15 2009 for rpm by  doxygen 1.5.7.1