Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

rpminstall.c File Reference

#include "system.h"
#include <rpmcli.h>
#include "rpmdb.h"
#include "rpmds.h"
#include "rpmts.h"
#include "manifest.h"
#include "misc.h"
#include "debug.h"

Go to the source code of this file.

Data Structures

struct  rpmEIU

Defines

#define _RPMTS_INTERNAL

Typedefs

typedef const char * str_t

Functions

void printHash (const unsigned long amount, const unsigned long total)
 Print a CLI progress bar.
void * rpmShowProgress (const void *arg, const rpmCallbackType what, const unsigned long amount, const unsigned long total, fnpyKey key, void *data)
int rpmInstall (rpmts ts, struct rpmInstallArguments_s *ia, const char **fileArgv)
int rpmErase (rpmts ts, struct rpmInstallArguments_s *ia, const char **argv)
int rpmInstallSource (rpmts ts, const char *arg, const char **specFilePtr, const char **cookie)
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)
 Load tag (instance,value) pairs from rpm databse, and return sorted id index.
IDTX IDTXglob (rpmts ts, const char *globstr, rpmTag tag)
 Load tag (instance,value) pairs from packages, and return sorted id index.
int rpmRollback (rpmts ts, struct rpmInstallArguments_s *ia, const char **argv)

Variables

int rpmcliPackagesTotal = 0
int rpmcliHashesCurrent = 0
int rpmcliHashesTotal = 0
int rpmcliProgressCurrent = 0
int rpmcliProgressTotal = 0
int reverse = -1


Detailed Description

Definition in file rpminstall.c.


Define Documentation

#define _RPMTS_INTERNAL
 

Definition at line 12 of file rpminstall.c.


Typedef Documentation

typedef const char* str_t
 

Definition at line 255 of file rpminstall.c.


Function Documentation

int IDTintcmp const void *  a,
const void *  b
[static]
 

Definition at line 911 of file rpminstall.c.

References IDT.

Referenced by IDTXsort().

IDTX IDTXfree IDTX  idtx  ) 
 

Destroy id index.

Parameters:
idtx id index
Returns:
NULL always

Definition at line 919 of file rpminstall.c.

References _free(), IDT_s::h, headerFree(), IDT, IDTX, and IDT_s::key.

Referenced by 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 1014 of file rpminstall.c.

References _, _free(), Fclose(), FD_t, Ferror(), Fopen(), Fstrerror(), IDT_s::h, Header, headerFree(), headerIsEntry(), headerLink(), HGE_t, IDT, IDTindex_s::idt, IDTX, IDTXgrow(), IDTXsort(), IDT_s::instance, int_32, IDT_s::key, IDTindex_s::nidt, RPMERR_OPEN, rpmError, rpmGlob(), rpmRC, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_SOURCEPACKAGE, rpmTagType, IDT_s::u32, and IDT_s::val.

Referenced by 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 943 of file rpminstall.c.

References IDTindex_s::alloced, IDTindex_s::delta, IDTindex_s::idt, IDTX, 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 967 of file rpminstall.c.

References IDT_s::h, Header, headerLink(), HGE_t, IDT, IDTindex_s::idt, IDTX, IDTXgrow(), IDTXsort(), IDT_s::instance, int_32, IDT_s::key, IDTindex_s::nidt, RPM_INT32_TYPE, rpmdbFreeIterator(), rpmdbGetIteratorOffset(), rpmdbMatchIterator, rpmdbNextIterator(), rpmdbSetIteratorRE(), RPMMIRE_DEFAULT, RPMTAG_NAME, rpmTagType, 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 935 of file rpminstall.c.

References IDTindex_s::delta, IDT, IDTX, 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 960 of file rpminstall.c.

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

Referenced by IDTXglob(), and IDTXload().

void printHash const unsigned long  amount,
const unsigned long  total
[static]
 

Print a CLI progress bar.

Todo:
Unsnarl isatty(STDOUT_FILENO) from the control flow.
Parameters:
amount current
total final

Definition at line 40 of file rpminstall.c.

References rpmcliHashesCurrent, rpmcliHashesTotal, rpmcliProgressCurrent, and rpmcliProgressTotal.

Referenced by rpmShowProgress().


Variable Documentation

int reverse = -1 [static]
 

Definition at line 907 of file rpminstall.c.

int rpmcliHashesCurrent = 0
 

Definition at line 26 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

int rpmcliHashesTotal = 0
 

Definition at line 28 of file rpminstall.c.

Referenced by printHash().

int rpmcliPackagesTotal = 0
 

Definition at line 24 of file rpminstall.c.

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

int rpmcliProgressCurrent = 0
 

Definition at line 30 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().

int rpmcliProgressTotal = 0
 

Definition at line 32 of file rpminstall.c.

Referenced by printHash(), and rpmShowProgress().


Generated on Fri May 4 07:55:19 2007 for rpm by  doxygen 1.3.9.1