#include "system.h"#include <rpmlib.h>#include <rpmte.h>#include <rpmgi.h>#include <rpmdb.h>#include <rpmmacro.h>#include "manifest.h"#include "debug.h"Include dependency graph for rpmgi.c:

Go to the source code of this file.
Defines | |
| #define | _RPMGI_INTERNAL |
| #define | _RPMTS_INTERNAL |
Functions | |
| static const char * | ftsInfoStr (int fts_info) |
| static FD_t | rpmgiOpen (const char *path, const char *fmode) |
| Open a file after macro expanding path. | |
| static rpmRC | rpmgiLoadManifest (rpmgi gi, const char *path) |
| Load manifest into iterator arg list. | |
| static Header | rpmgiReadHeader (rpmgi gi, const char *path) |
| Return header from package. | |
| static rpmRC | rpmgiLoadNextKey (rpmgi gi) |
| Load next key from argv list. | |
| static rpmRC | rpmgiLoadReadHeader (rpmgi gi) |
| Read next header from package, lazily expanding manifests as found. | |
| static rpmRC | rpmgiWalkPathFilter (rpmgi gi) |
| Filter file tree walk path. | |
| static rpmRC | rpmgiWalkReadHeader (rpmgi gi) |
| Read header from next package, lazily walking file tree. | |
| const char * | rpmgiEscapeSpaces (const char *s) |
| Escape isspace(3) characters in string. | |
| static rpmRC | rpmgiGlobArgv (rpmgi gi, ARGV_t argv) |
| Append globbed arg list to iterator. | |
| static rpmRC | rpmgiInitFilter (rpmgi gi) |
| Return rpmdb match iterator with filters (if any) set. | |
| rpmgi | XrpmgiUnlink (rpmgi gi, const char *msg, const char *fn, unsigned ln) |
| rpmgi | XrpmgiLink (rpmgi gi, const char *msg, const char *fn, unsigned ln) |
| rpmgi | rpmgiFree (rpmgi gi) |
| Destroy a generalized iterator. | |
| rpmgi | rpmgiNew (rpmts ts, int tag, const void *keyp, size_t keylen) |
| Return a generalized iterator. | |
| rpmRC | rpmgiNext (rpmgi gi) |
| Perform next iteration step. | |
| const char * | rpmgiHdrPath (rpmgi gi) |
| Return current header path. | |
| Header | rpmgiHeader (rpmgi gi) |
| Return current iteration header. | |
| rpmts | rpmgiTs (rpmgi gi) |
| Return current iteration transaction set. | |
| rpmRC | rpmgiSetArgs (rpmgi gi, ARGV_t argv, int ftsOpts, rpmgiFlags flags) |
| Load iterator args. | |
Variables | |
| int | _rpmgi_debug = 0 |
| rpmgiFlags | giFlags = RPMGI_NONE |
| static int | indent = 2 |
| static const char * | ftsInfoStrings [] |
| static const char * | _query_hdlist_path = "/usr/share/comps/%{_arch}/hdlist" |
Definition in file rpmgi.c.
|
|
|
|
|
|
|
|
Definition at line 64 of file rpmgi.c. References ftsInfoStrings. Referenced by rpmfts_print(), and rpmgiWalkPathFilter(). |
|
|
Escape isspace(3) characters in string.
Definition at line 323 of file rpmgi.c. References xmalloc(). Referenced by IDTXglob(), rpmgiGlobArgv(), and rpmInstall(). |
|
|
Destroy a generalized iterator.
Definition at line 475 of file rpmgi.c. References _free(), argvFree(), Fclose(), Fts_close(), headerFree(), rpmdbFreeIterator(), rpmgiUnlink, rpmtsFree(), and rpmtsiFree. Referenced by rpmcliArgIter(). |
|
||||||||||||
|
Append globbed arg list to iterator.
Definition at line 353 of file rpmgi.c. References _free(), argvAppend(), argvFree(), RPMDBI_ARGLIST, RPMDBI_FTSWALK, RPMDBI_HDLIST, RPMGI_NOGLOB, rpmgiEscapeSpaces(), rpmGlob(), and RPMRC_OK. Referenced by rpmgiSetArgs(). |
|
|
Return current header path.
Definition at line 813 of file rpmgi.c. Referenced by rpmcliArgIter(). |
|
|
Return current iteration header.
Definition at line 818 of file rpmgi.c. Referenced by rpmgiShowMatches(). |
|
|
Return rpmdb match iterator with filters (if any) set.
Definition at line 397 of file rpmgi.c. References _, _free(), _rpmgi_debug, rpmdbFreeIterator(), RPMDBI_PACKAGES, rpmdbSetIteratorRE(), RPMERR_QUERYINFO, rpmError, RPMRC_FAIL, RPMRC_OK, RPMTAG_NAME, rpmtsInitIterator(), tagName(), tagValue(), and xstrdup(). Referenced by rpmgiNext(). |
|
||||||||||||
|
Load manifest into iterator arg list.
Definition at line 110 of file rpmgi.c. References Fclose(), rpmgiOpen(), RPMRC_FAIL, and rpmReadPackageManifest(). Referenced by rpmgiLoadReadHeader(). |
|
|
Load next key from argv list.
Definition at line 166 of file rpmgi.c. References RPMRC_NOTFOUND, and RPMRC_OK. Referenced by rpmgiNext(). |
|
|
Read next header from package, lazily expanding manifests as found.
Definition at line 190 of file rpmgi.c. References _free(), errno, headerFree(), headerLink(), RPMGI_NOHEADER, RPMGI_NOMANIFEST, rpmgiLoadManifest(), rpmgiReadHeader(), RPMRC_NOTFOUND, and RPMRC_OK. Referenced by rpmgiNext(). |
|
||||||||||||||||||||
|
Return a generalized iterator.
Definition at line 514 of file rpmgi.c. References rpmgiLink, rpmtsLink, rpmtsOrder(), and xcalloc(). Referenced by rpmcliArgIter(). |
|
|
||||||||||||
|
Open a file after macro expanding path.
Definition at line 83 of file rpmgi.c. References _, _free(), errno, Fclose(), Ferror(), Fopen(), Fstrerror(), RPMERR_OPEN, rpmError, and rpmExpand(). Referenced by rpmgiLoadManifest(), rpmgiNext(), and rpmgiReadHeader(). |
|
||||||||||||
|
Return header from package.
Definition at line 131 of file rpmgi.c. References Fclose(), headerFree(), rpmgiOpen(), RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, and rpmReadPackageFile(). Referenced by rpmgiLoadReadHeader(), and rpmgiWalkReadHeader(). |
|
||||||||||||||||||||
|
Load iterator args.
Definition at line 832 of file rpmgi.c. References rpmgiGlobArgv(), and RPMRC_FAIL. Referenced by rpmcliArgIter(). |
|
|
Return current iteration transaction set.
|
|
|
Filter file tree walk path.
Definition at line 238 of file rpmgi.c. References _rpmgi_debug, 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, FTS_SL, FTS_SLNONE, FTS_W, ftsInfoStr(), indent, RPMMESS_DEBUG, rpmMessage, RPMRC_NOTFOUND, and RPMRC_OK. Referenced by rpmgiWalkReadHeader(). |
|
|
Read header from next package, lazily walking file tree.
Definition at line 287 of file rpmgi.c. References Fts_read(), headerFree(), headerLink(), RPMGI_NOHEADER, rpmgiReadHeader(), rpmgiWalkPathFilter(), RPMRC_NOTFOUND, and RPMRC_OK. Referenced by rpmgiNext(). |
|
||||||||||||||||||||
|
Definition at line 464 of file rpmgi.c. References _rpmgi_debug, and tagName(). |
|
||||||||||||||||||||
|
Definition at line 453 of file rpmgi.c. References _rpmgi_debug, and tagName(). |
|
|
Definition at line 551 of file rpmgi.c. Referenced by rpmgiNext(). |
|
|
|
|
|
Initial value: {
"UNKNOWN",
"D",
"DC",
"DEFAULT",
"DNR",
"DOT",
"DP",
"ERR",
"F",
"INIT",
"NS",
"NSOK",
"SL",
"SLNONE",
"W",
}
Definition at line 43 of file rpmgi.c. Referenced by ftsInfoStr(). |
|
|
Definition at line 33 of file rpmgi.c. Referenced by rpmcliArgIter(). |
|
|
Definition at line 38 of file rpmgi.c. Referenced by rpmfts_print(), rpmgiWalkPathFilter(), yamlstrcpy(), and yamlstrlen(). |
1.4.4