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

tools/rpmcache.c File Reference

More...

#include "system.h"
#include <fnmatch.h>
#include <fts.h>
#include <rpmcli.h>
#include "rpmps.h"
#include "rpmdb.h"
#include "rpmds.h"
#include "rpmts.h"
#include "misc.h"
#include "debug.h"

Go to the source code of this file.

Data Structures

struct  ftsglob_s
struct  Item_s

Typedefs

typedef Item_sItem

Functions

Item freeItem (Item item)
int cmpItem (const void *a, const void *b)
void freeItems (void)
int ftsCachePrint (rpmts ts, FILE *fp)
int ftsCacheUpdate (rpmts ts)
int archOkay (const char *pkgArch)
int osOkay (const char *pkgOs)
int ftsStashLatest (FTSENT *fts, rpmts ts)
const char * ftsInfoStr (int fts_info)
int ftsPrint (FTS *ftsp, FTSENT *fts, rpmts ts)
void initGlobs (rpmts ts, const char **argv)
 Initialize fts and glob structures.

int main (int argc, char *const argv[])

Variables

int _debug = 0
int noCache = 0
char ** ftsSet
int ftsOpts = 0
const char * bhpath
int bhpathlen = 0
int bhlvl = -1
ftsglob_sbhglobs
int nbhglobs = 5
int indent = 2
Itemitems = NULL
int nitems = 0
Item newItem (void)
const char * ftsInfoStrings []
rpmVSFlags vsflags = 0
poptOption optionsTable []


Detailed Description

Definition in file rpmcache.c.


Typedef Documentation

typedef struct Item_s * Item
 


Function Documentation

int archOkay const char *    pkgArch [static]
 

Definition at line 165 of file rpmcache.c.

References RPM_MACHTABLE_INSTARCH, and rpmMachineScore().

Referenced by ftsStashLatest(), and rpmtsRun().

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

Definition at line 67 of file rpmcache.c.

References rpmdsN(), and Item_s::this.

Referenced by ftsStashLatest().

Item freeItem Item    item [inline, static]
 

Definition at line 52 of file rpmcache.c.

References _free(), Item_s::h, headerFree(), Item_s::path, rpmdsFree(), and Item_s::this.

Referenced by freeItems(), and ftsStashLatest().

void freeItems void    [static]
 

Definition at line 74 of file rpmcache.c.

References _free(), freeItem(), and nitems.

Referenced by main().

int ftsCachePrint rpmts    ts,
FILE *    fp
[static]
 

Definition at line 82 of file rpmcache.c.

References nitems, Item_s::path, and rpmts.

Referenced by main().

int ftsCacheUpdate rpmts    ts [static]
 

Definition at line 102 of file rpmcache.c.

References Item_s::h, headerAddOrAppendEntry(), HGE_t, int_32, Item_s::mtime, nitems, Item_s::path, RMIL_CMDLINE, RPM_INT32_TYPE, RPM_STRING_ARRAY_TYPE, rpmdbAdd(), rpmdbFreeIterator(), rpmdbGetIteratorCount(), rpmDefineMacro(), RPMTAG_CACHECTIME, RPMTAG_CACHEPKGMTIME, RPMTAG_CACHEPKGPATH, RPMTAG_CACHEPKGSIZE, RPMTAG_SIGMD5, rpmts, rpmtsCloseDB(), rpmtsGetRdb(), rpmtsGetTid(), rpmtsInitIterator(), rpmtsOpenDB(), and Item_s::size.

Referenced by main().

const char* ftsInfoStr int    fts_info [static]
 

Definition at line 308 of file rpmcache.c.

References ftsInfoStrings.

Referenced by ftsPrint(), and rpmfts_print().

int ftsPrint FTS   ftsp,
FTSENT   fts,
rpmts    ts
[static]
 

Definition at line 314 of file rpmcache.c.

References bhlvl, bhpath, bhpathlen, ftsglob_s::fnflags, FTS_D, FTS_DC, FTS_DEFAULT, FTS_DNR, FTS_DOT, FTS_DP, FTS_ERR, FTS_F, _ftsent::fts_info, FTS_INIT, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_namelen, FTS_NS, FTS_NSOK, _ftsent::fts_parent, _ftsent::fts_path, _ftsent::fts_pathlen, Fts_set(), FTS_SKIP, FTS_SL, FTS_SLNONE, FTS_W, ftsInfoStr(), ftsStashLatest(), indent, nbhglobs, ftsglob_s::patterns, and rpmts.

Referenced by main().

int ftsStashLatest FTSENT   fts,
rpmts    ts
[static]
 

Definition at line 181 of file rpmcache.c.

References alloca(), archOkay(), cmpItem(), Fclose(), Ferror(), Fopen(), freeItem(), _ftsent::fts_accpath, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_path, _ftsent::fts_statp, Item_s::h, headerFree(), headerGetEntry(), headerLink(), indent, Item_s::mtime, newItem, nitems, osOkay(), Item_s::path, rpmds, rpmdsCompare(), rpmdsFree(), rpmdsThis(), RPMMESS_DEBUG, rpmMessage, rpmRC, RPMRC_OK, rpmReadPackageFile(), RPMSENSE_EQUAL, RPMSENSE_LESS, RPMTAG_ARCH, RPMTAG_OS, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, rpmts, Item_s::size, Stat(), Item_s::this, xrealloc(), and xstrdup().

Referenced by ftsPrint().

void initGlobs rpmts    ts,
const char **    argv
[static]
 

Initialize fts and glob structures.

Parameters:
ts  transaction set
argv  package names to match

Definition at line 441 of file rpmcache.c.

References _free(), argv, bhpath, bhpathlen, ftsglob_s::fnflags, ftsSet, myGlobPatternP(), nbhglobs, ftsglob_s::patterns, rpmExpand(), RPMMESS_DEBUG, rpmMessage, rpmts, stpcpy(), and xcalloc().

Referenced by main().

int main int    argc,
char *const    argv[]
 

Definition at line 555 of file rpmcache.c.

References _, __progname, _free(), _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, argv, EXIT_FAILURE, freeItems(), Fts_close(), FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, Fts_open(), Fts_read(), ftsCachePrint(), ftsCacheUpdate(), ftsOpts, ftsPrint(), ftsSet, initGlobs(), int_32, poptGetArgs(), rpmcliFini(), rpmcliInit(), rpmExpand(), rpmMkdirPath(), rpmRC, RPMRC_FAIL, RPMRC_OK, rpmts, rpmtsCreate(), rpmtsFree(), rpmtsSetTid(), rpmtsSetVSFlags(), RPMVSF_NOHDRCHK, VERIFY_DIGEST, VERIFY_HDRCHK, VERIFY_SIGNATURE, and vsflags.

int osOkay const char *    pkgOs [static]
 

Definition at line 174 of file rpmcache.c.

References RPM_MACHTABLE_INSTOS, and rpmMachineScore().

Referenced by ftsStashLatest(), and rpmtsRun().


Variable Documentation

int _debug = 0 [static]
 

Definition at line 19 of file rpmcache.c.

struct ftsglob_s* bhglobs [static]
 

Definition at line 36 of file rpmcache.c.

int bhlvl = -1
 

Definition at line 29 of file rpmcache.c.

Referenced by ftsPrint().

const char* bhpath
 

Definition at line 27 of file rpmcache.c.

Referenced by ftsPrint(), and initGlobs().

int bhpathlen = 0
 

Definition at line 28 of file rpmcache.c.

Referenced by ftsPrint(), and initGlobs().

const char* ftsInfoStrings[] [static]
 

Initial value:

 {
    "UNKNOWN",
    "D",
    "DC",
    "DEFAULT",
    "DNR",
    "DOT",
    "DP",
    "ERR",
    "F",
    "INIT",
    "NS",
    "NSOK",
    "SL",
    "SLNONE",
    "W",
}

Definition at line 290 of file rpmcache.c.

Referenced by ftsInfoStr().

int ftsOpts = 0 [static]
 

Definition at line 25 of file rpmcache.c.

Referenced by main().

char** ftsSet [static]
 

Definition at line 24 of file rpmcache.c.

Referenced by initGlobs(), and main().

int indent = 2 [static]
 

Definition at line 39 of file rpmcache.c.

Referenced by ftsPrint(), and ftsStashLatest().

Item* items = NULL [static]
 

Definition at line 49 of file rpmcache.c.

int nbhglobs = 5 [static]
 

Definition at line 37 of file rpmcache.c.

Referenced by ftsPrint(), and initGlobs().

Item newItem(void) [static]
 

Definition at line 62 of file rpmcache.c.

Referenced by ftsStashLatest().

int nitems = 0 [static]
 

Definition at line 50 of file rpmcache.c.

Referenced by freeItems(), ftsCachePrint(), ftsCacheUpdate(), and ftsStashLatest().

int noCache = 0 [static]
 

Definition at line 22 of file rpmcache.c.

struct poptOption optionsTable[] [static]
 

Definition at line 513 of file rpmcache.c.

rpmVSFlags vsflags = 0 [static]
 

Definition at line 511 of file rpmcache.c.

Referenced by main().


Generated on Sun Oct 26 13:02:08 2003 for rpm by doxygen1.2.18