|
rpm 5.3.7
|
#include "system.h"#include <fnmatch.h>#include <fts.h>#include <rpmio.h>#include <rpmiotypes.h>#include <poptIO.h>#include <rpmtypes.h>#include <rpmtag.h>#include <rpmdb.h>#include "rpmps.h"#include "misc.h"#include <rpmgi.h>#include <rpmcli.h>#include "debug.h"
Go to the source code of this file.
Data Structures | |
| struct | ftsglob_s |
| struct | Item_s |
Defines | |
| #define | _RPMGI_INTERNAL |
Typedefs | |
| typedef struct Item_s * | Item |
Functions | |
| static Item | freeItem (Item item) |
| static Item | newItem (void) |
| static int | cmpItem (const void *a, const void *b) |
| static void | freeItems (void) |
| static int | ftsCachePrint (rpmts ts, FILE *fp) |
| static int | ftsCacheUpdate (rpmts ts) |
| static rpmRC | cacheStashLatest (rpmgi gi, Header h) |
| static const char * | ftsInfoStr (int fts_info) |
| static rpmRC | cacheWalkPathFilter (rpmgi gi) |
| static void | initGlobs (rpmts ts, const char **argv) |
| Initialize fts and glob structures. | |
| static void | freeGlobs (void) |
| int | main (int argc, char *argv[]) |
Variables | |
| const char * | __progname |
| static int | _debug = 0 |
| static int | noCache = -1 |
| static ARGV_t | ftsSet |
| const char * | bhpath |
| int | bhpathlen = 0 |
| int | bhlvl = -1 |
| static struct ftsglob_s * | bhglobs |
| static int | nbhglobs = 5 |
| static int | indent = 2 |
| static Item * | items = NULL |
| static int | nitems = 0 |
| static const char * | ftsInfoStrings [] |
| static rpmVSFlags | vsflags = 0 |
| static struct poptOption | optionsTable [] |
Definition in file rpmcache.c.
| #define _RPMGI_INTERNAL |
Definition at line 23 of file rpmcache.c.
Definition at line 206 of file rpmcache.c.
References alloca(), cmpItem(), freeItem(), _ftsent::fts_accpath, _ftsent::fts_level, _ftsent::fts_name, _ftsent::fts_path, _ftsent::fts_statp, Item_s::h, headerLink(), indent, items, L, Item_s::mtime, newItem(), nitems, Item_s::path, rpmdsCompare(), rpmdsFree(), rpmdsThis(), rpmlog(), RPMLOG_DEBUG, RPMRC_NOTFOUND, RPMRC_OK, RPMSENSE_EQUAL, RPMSENSE_LESS, Item_s::size, Stat(), Item_s::this, xrealloc(), and xstrdup().
Referenced by main().
Definition at line 317 of file rpmcache.c.
References _debug, bhglobs, bhlvl, bhpath, bhpathlen, ftsglob_s::fnflags, fnmatch(), 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(), indent, nbhglobs, ftsglob_s::patterns, and RPMRC_OK.
Referenced by main().
| static int cmpItem | ( | const void * | a, |
| const void * | b | ||
| ) | [static] |
Definition at line 79 of file rpmcache.c.
References rpmdsN(), and Item_s::this.
Referenced by cacheStashLatest().
| static void freeGlobs | ( | void | ) | [static] |
Definition at line 514 of file rpmcache.c.
References _free(), ftsSet, nbhglobs, and ftsglob_s::patterns.
Referenced by main().
Definition at line 62 of file rpmcache.c.
References _free(), Item_s::h, headerFree(), Item_s::path, rpmdsFree(), and Item_s::this.
Referenced by cacheStashLatest(), and freeItems().
| static void freeItems | ( | void | ) | [static] |
Definition at line 86 of file rpmcache.c.
References _free(), freeItem(), and nitems.
Referenced by main().
| static int ftsCachePrint | ( | rpmts | ts, |
| FILE * | fp | ||
| ) | [static] |
Definition at line 94 of file rpmcache.c.
References nitems, and Item_s::path.
Referenced by main().
| static int ftsCacheUpdate | ( | rpmts | ts | ) | [static] |
Definition at line 114 of file rpmcache.c.
References _free(), alloca(), _HE_s::append, rpmDataType_u::argv, _HE_s::c, Item_s::h, headerGet(), headerPut(), Item_s::mtime, nitems, _HE_s::p, Item_s::path, RMIL_CMDLINE, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, rpmdbAdd(), rpmDefineMacro(), rpmmiCount(), rpmmiFree(), RPMTAG_SIGMD5, rpmtsCloseDB(), rpmtsGetRdb(), rpmtsGetTid(), rpmtsInitIterator(), rpmtsOpenDB(), rpmtsVSFlags(), RPMVSF_NOHDRCHK, Item_s::size, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, and rpmDataType_u::ui8p.
Referenced by main().
| static const char* ftsInfoStr | ( | int | fts_info | ) | [static] |
Definition at line 311 of file rpmcache.c.
References ftsInfoStrings.
Referenced by cacheWalkPathFilter().
| static void initGlobs | ( | rpmts | ts, |
| const char ** | argv | ||
| ) | [static] |
Initialize fts and glob structures.
| ts | transaction set |
| argv | package names to match |
Definition at line 444 of file rpmcache.c.
References _free(), bhpath, bhpathlen, ftsglob_s::fnflags, FNM_EXTMATCH, FNM_PATHNAME, FNM_PERIOD, ftsSet, Glob_pattern_p(), nbhglobs, ftsglob_s::patterns, rpmExpand(), rpmlog(), RPMLOG_DEBUG, stpcpy(), and xcalloc().
Referenced by main().
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
Definition at line 551 of file rpmcache.c.
References _, __progname, _free(), _RPMVSF_NODIGESTS, _RPMVSF_NOSIGNATURES, Access(), cacheStashLatest(), cacheWalkPathFilter(), EXIT_FAILURE, freeGlobs(), freeItems(), FTS_COMFOLLOW, FTS_LOGICAL, FTS_NOSTAT, ftsCachePrint(), ftsCacheUpdate(), ftsSet, giFlags, initGlobs(), noCache, optionsTable, rpmcliFini(), rpmcliInit(), rpmcliQueryFlags, RPMDBI_FTSWALK, rpmExpand(), rpmgiFree(), rpmgiNew(), rpmgiNext(), rpmgiSetArgs(), rpmioFtsOpts, rpmMkdirPath(), RPMRC_FAIL, RPMRC_OK, rpmtsCreate(), rpmtsFree(), rpmtsSetTid(), rpmtsSetVSFlags(), RPMVSF_NOHDRCHK, VERIFY_DIGEST, VERIFY_HDRCHK, VERIFY_SIGNATURE, vsflags, and W_OK.
| static Item newItem | ( | void | ) | [inline, static] |
| const char* __progname |
Definition at line 6 of file rpmcache.c.
int _debug = 0 [static] |
Definition at line 30 of file rpmcache.c.
Referenced by cacheWalkPathFilter().
Definition at line 46 of file rpmcache.c.
Referenced by cacheWalkPathFilter().
| int bhlvl = -1 |
Definition at line 39 of file rpmcache.c.
Referenced by cacheWalkPathFilter().
| const char* bhpath |
Definition at line 37 of file rpmcache.c.
Referenced by cacheWalkPathFilter(), and initGlobs().
| int bhpathlen = 0 |
Definition at line 38 of file rpmcache.c.
Referenced by cacheWalkPathFilter(), and initGlobs().
const char* ftsInfoStrings[] [static] |
{
"UNKNOWN",
"D",
"DC",
"DEFAULT",
"DNR",
"DOT",
"DP",
"ERR",
"F",
"INIT",
"NS",
"NSOK",
"SL",
"SLNONE",
"W",
}
Definition at line 293 of file rpmcache.c.
Referenced by ftsInfoStr().
Definition at line 35 of file rpmcache.c.
Referenced by freeGlobs(), initGlobs(), main(), and recurseDir().
int indent = 2 [static] |
Definition at line 49 of file rpmcache.c.
Referenced by cacheStashLatest(), and cacheWalkPathFilter().
Definition at line 59 of file rpmcache.c.
Referenced by cacheStashLatest().
int nbhglobs = 5 [static] |
Definition at line 47 of file rpmcache.c.
Referenced by cacheWalkPathFilter(), freeGlobs(), and initGlobs().
int nitems = 0 [static] |
Definition at line 60 of file rpmcache.c.
Referenced by cacheStashLatest(), freeItems(), fts_build(), Fts_open(), ftsCachePrint(), and ftsCacheUpdate().
int noCache = -1 [static] |
Definition at line 33 of file rpmcache.c.
Referenced by main().
struct poptOption optionsTable[] [static] |
{
{ "nolegacy", '\0', POPT_BIT_SET, &vsflags, RPMVSF_NEEDPAYLOAD,
N_("don't verify header+payload signature"), NULL },
{ "cache", '\0', POPT_ARG_VAL, &noCache, 0,
N_("update cache database"), NULL },
{ "nocache", '\0', POPT_ARG_VAL, &noCache, -1,
N_("don't update cache database, only print package paths"), NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioFtsPoptTable, 0,
N_("File tree walk options:"),
NULL },
{ NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmcliAllPoptTable, 0,
N_("Common options for all rpm modes and executables:"),
NULL },
POPT_AUTOALIAS
POPT_AUTOHELP
POPT_TABLEEND
}
Definition at line 528 of file rpmcache.c.
Referenced by main().
rpmVSFlags vsflags = 0 [static] |
Definition at line 526 of file rpmcache.c.
Referenced by headerCheck(), main(), rpmcliInstall(), rpmcliQuery(), rpmcliVerify(), rpmErase(), rpmReadPackageFile(), rpmRollback(), rpmts_new(), rpmts_SetVSFlags(), rpmtsRollback(), and rpmtsSetVSFlags().
1.7.3