rpm
5.4.15
|
Go to the source code of this file.
Macros | |
#define | RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFX32|RPMFC_ELFMIPSN32) |
#define | rpmfcUnlink(_fc) ((rpmfc)rpmioUnlinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmfcLink(_fc) ((rpmfc)rpmioLinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmfcFree(_fc) ((rpmfc)rpmioFreePoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct rpmfc_s * | rpmfc |
typedef struct rpmfcTokens_s * | rpmfcToken |
typedef enum FCOLOR_e | FCOLOR_t |
Enumerations | |
enum | FCOLOR_e { RPMFC_BLACK = 0, RPMFC_ELF32 = (1 << 0), RPMFC_ELF64 = (1 << 1), RPMFC_ELFX32 = (1 << 2), RPMFC_ELFMIPSN32 = (1 << 2), RPMFC_DESKTOP_FILE = (1 << 4), RPMFC_TYPELIB = (1 << 5), RPMFC_HASKELL = (1 << 6), RPMFC_RUBY = (1 << 7), RPMFC_PKGCONFIG = (1 << 8), RPMFC_LIBTOOL = (1 << 9), RPMFC_BOURNE = (1 << 10), RPMFC_MONO = (1 << 11), RPMFC_SCRIPT = (1 << 12), RPMFC_STATIC = (1 << 13), RPMFC_NOTSTRIPPED = (1 << 14), RPMFC_DIRECTORY = (1 << 16), RPMFC_SYMLINK = (2 << 16), RPMFC_DEVICE = (3 << 16), RPMFC_LIBRARY = (4 << 16), RPMFC_FONT = (5 << 16), RPMFC_IMAGE = (6 << 16), RPMFC_MANPAGE = (7 << 16), RPMFC_TEXT = (8 << 16), RPMFC_DOCUMENT = (9 << 16), RPMFC_ARCHIVE = (1 << 20), RPMFC_COMPRESSED = (1 << 21), RPMFC_MODULE = (1 << 22), RPMFC_EXECUTABLE = (1 << 23), RPMFC_PERL = (1 << 24), RPMFC_JAVA = (1 << 25), RPMFC_PYTHON = (1 << 26), RPMFC_PHP = (1 << 27), RPMFC_TCL = (1 << 28), RPMFC_WHITE = (1 << 29), RPMFC_INCLUDE = (1 << 30), RPMFC_ERROR = (1 << 31) } |
Functions | |
int | rpmfcExec (const char **av, rpmiob iob_stdin, rpmiob *iob_stdoutp, int failnonzero) |
Return helper output. More... | |
int | rpmfcColoring (const char *fmstr) |
Return file color given file(1) string. More... | |
void | rpmfcPrint (const char *msg, rpmfc fc, FILE *fp) |
Print results of file classification. More... | |
rpmRC | rpmfcClassify (rpmfc fc, const char **argv, rpmuint16_t *fmode) |
Build file class dictionary and mappings. More... | |
rpmRC | rpmfcApply (rpmfc fc) |
Build file/package dependency dictionary and mappings. More... | |
rpmRC | rpmfcGenerateDepends (void *_spec, void *_pkg) |
Generate package dependencies. More... | |
rpmfc | rpmfcUnlink (rpmfc fc) |
Unreference a file classifier instance. More... | |
rpmfc | rpmfcLink (rpmfc fc) |
Reference a file classifier instance. More... | |
rpmfc | rpmfcFree (rpmfc fc) |
Destroy a file classifier. More... | |
rpmfc | rpmfcNew (void) |
Create a file classifier. More... | |
Variables | |
int | _rpmfc_debug |
#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFX32|RPMFC_ELFMIPSN32) |
#define rpmfcFree | ( | _fc | ) | ((rpmfc)rpmioFreePoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmfcLink | ( | _fc | ) | ((rpmfc)rpmioLinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmfcUnlink | ( | _fc | ) | ((rpmfc)rpmioUnlinkPoolItem((rpmioItem)(_fc), __FUNCTION__, __FILE__, __LINE__)) |
typedef struct rpmfcTokens_s* rpmfcToken |
enum FCOLOR_e |
Build file/package dependency dictionary and mappings.
fc | file classifier |
Definition at line 1096 of file rpmfc.c.
References _, argiAdd(), argiCount(), argvCount(), rpmfcApplyTbl_s::colormask, D_, rpmfcApplyTbl_s::func, i, j, mireFree(), mireNew(), mireRegcomp(), mireRegexec(), rpmdsFind(), rpmdsFree(), rpmdsSingle(), RPMFC_HASKELL, RPMFC_LIBRARY, RPMFC_MODULE, RPMFC_PYTHON, RPMFC_RUBY, RPMFC_SCRIPT, rpmfcExpandRegexps(), rpmfcFreeRegexps(), rpmlog(), RPMLOG_DEBUG, RPMLOG_NOTICE, RPMMIRE_REGEX, RPMRC_OK, RPMTAG_FILEPATHS, RPMTAG_PROVIDENAME, and RPMTAG_REQUIRENAME.
Referenced by main(), and rpmfcGenerateDepends().
rpmRC rpmfcClassify | ( | rpmfc | fc, |
const char ** | argv, | ||
rpmuint16_t * | fmode | ||
) |
Build file class dictionary and mappings.
fc | file classifier |
argv | files to classify |
fmode | files mode_t array (or NULL) |
int rpmfcColoring | ( | const char * | fmstr | ) |
Return file color given file(1) string.
fmstr | file(1) string |
Definition at line 679 of file rpmfc.c.
References RPMFC_BLACK, RPMFC_ELF32, RPMFC_ELFX32, and RPMFC_INCLUDE.
Referenced by rpmfcClassify().
Return helper output.
av | helper argv (with possible macros) |
iob_stdin | helper input |
*iob_stdoutp | helper output |
failnonzero | Is non-zero helper exit status a failure? |
Destroy a file classifier.
fc | file classifier |
Referenced by main(), and rpmfcGenerateDepends().
rpmRC rpmfcGenerateDepends | ( | void * | _spec, |
void * | _pkg | ||
) |
Generate package dependencies.
_spec | spec file control |
_pkg | package control |
Definition at line 1932 of file rpmfc.c.
References _free(), _rpmfc_debug, alloca(), argiCount(), argiData(), rpmDataType_u::argv, argvCount(), argvData(), argvFree(), Package_s::autoProv, Package_s::autoReq, _HE_s::c, Package_s::ds, fi, Package_s::fi, Package_s::header, headerDel(), headerPut(), i, DepMsg_s::msg, _HE_s::p, printDeps(), rpmDataType_u::ptr, removeSillyDeps(), Spec_s::rootURL, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, rpmdsCount(), rpmdsEVR(), rpmdsFree(), rpmdsMerge(), rpmdsN(), rpmdsNew(), rpmdsSingle(), rpmExpandNumeric(), rpmfcApply(), rpmfcClassify(), rpmfcFree(), rpmfcGenerateDependsHelper(), rpmfcGenerateScriptletDeps(), rpmfcNew(), rpmfcPrint(), rpmfiFC(), rpmfiFFlags(), rpmfiFMode(), rpmfiFN(), rpmfiInit(), RPMFILE_CONFIG, rpmfiNext(), rpmGenPath(), RPMRC_OK, RPMSENSE_EQUAL, RPMTAG_CLASSDICT, RPMTAG_DEPENDSDICT, RPMTAG_FILECLASS, RPMTAG_FILECOLORS, RPMTAG_FILEDEPENDSN, RPMTAG_FILEDEPENDSX, RPMTAG_PROVIDEFLAGS, RPMTAG_PROVIDENAME, RPMTAG_PROVIDEVERSION, RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION, _HE_s::t, _HE_s::tag, rpmDataType_u::ui32p, urlPath(), xcalloc(), and xstrdup().
Referenced by processBinaryFiles().
Reference a file classifier instance.
fc | file classifier |
Referenced by rpmfcNew().
rpmfc rpmfcNew | ( | void | ) |
Create a file classifier.
Definition at line 2247 of file rpmfc.c.
References rpmfcGetPool(), rpmfcLink(), and xcalloc().
Referenced by main(), and rpmfcGenerateDepends().
void rpmfcPrint | ( | const char * | msg, |
rpmfc | fc, | ||
FILE * | fp | ||
) |
Print results of file classification.
msg | message prefix (NULL for none) |
fc | file classifier |
fp | output file handle (NULL for stderr) |
Definition at line 698 of file rpmfc.c.
References rpmdsCount(), rpmdsDNEVR(), rpmdsNext(), rpmdsSetIx(), and RPMFC_BLACK.
Referenced by main(), and rpmfcGenerateDepends().
Unreference a file classifier instance.
fc | file classifier |
int _rpmfc_debug |
Definition at line 123 of file poptALL.c.
Referenced by main(), rpmdepPrint(), rpmfcClassify(), rpmfcGenerateDepends(), rpmfcGetPool(), and rpmfcMergePR().