rpm
5.4.10
|
Routines to handle file info tag sets. More...
#include "system.h"
#include <rpmiotypes.h>
#include <rpmio.h>
#include <rpmlog.h>
#include <rpmbf.h>
#include <rpmurl.h>
#include <rpmdir.h>
#include <rpmmacro.h>
#include <ugid.h>
#include <rpmdav.h>
#include <rpmtypes.h>
#include <rpmtag.h>
#include "fprint.h"
#include "fsm.h"
#include "legacy.h"
#include "rpmds.h"
#include "rpmte.h"
#include "rpmts.h"
#include <rpmcli.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | rpmRelocation_s |
Macros | |
#define | _RPMDIR_INTERNAL |
#define | _RPMAV_INTERNAL /* XXX avOpendir */ |
#define | _FPRINT_INTERNAL |
#define | _IOSM_INTERNAL |
#define | _RPMFI_INTERNAL |
#define | _RPMTE_INTERNAL /* relocations */ |
#define | alloca_strdup(_s) strcpy((char *)alloca(strlen(_s)+1), (_s)) |
#define | _fdupestring(_h, _tag, _data) |
#define | _fdupedata(_h, _tag, _cast, _data) |
Functions | |
static char * | stripTrailingChar (char *s, char c) |
Remove occurrences of trailing character from string. | |
int | rpmfiFC (rpmfi fi) |
Return file count from file info set. | |
int | rpmfiDC (rpmfi fi) |
Return directory count from file info set. | |
int | rpmfiFX (rpmfi fi) |
Return current file index from file info set. | |
int | rpmfiSetFX (rpmfi fi, int fx) |
Set current file index in file info set. | |
int | rpmfiDX (rpmfi fi) |
Return current directory index from file info set. | |
int | rpmfiSetDX (rpmfi fi, int dx) |
Set current directory index in file info set. | |
int | rpmfiIsSource (rpmfi fi) |
Return source rpm marker from file info set. | |
const char * | rpmfiBN (rpmfi fi) |
Return current base name from file info set. | |
const char * | rpmfiDN (rpmfi fi) |
Return current directory name from file info set. | |
const char * | rpmfiFN (rpmfi fi) |
Return current file name from file info set. | |
void * | rpmfiFNBF (rpmfi fi) |
Return FN Bloom filter from file info set. | |
size_t | rpmfiFNMaxLen (rpmfi fi) |
Return maximum file name length from file info set. | |
rpmuint32_t | rpmfiFFlags (rpmfi fi) |
Return current file flags from file info set. | |
rpmuint32_t | rpmfiSetFFlags (rpmfi fi, rpmuint32_t FFlags) |
Set current file flags in file info set. | |
rpmuint32_t | rpmfiVFlags (rpmfi fi) |
Return current file verify flags from file info set. | |
rpmuint32_t | rpmfiSetVFlags (rpmfi fi, rpmuint32_t VFlags) |
Set current file verify flags in file info set. | |
rpmuint16_t | rpmfiFMode (rpmfi fi) |
Return current file mode from file info set. | |
rpmfileState | rpmfiFState (rpmfi fi) |
Return current file state from file info set. | |
rpmfileState | rpmfiSetFState (rpmfi fi, rpmfileState fstate) |
Set current file state in file info set. | |
const unsigned char * | rpmfiDigest (rpmfi fi, int *algop, size_t *lenp) |
Return current file (binary) digest from file info set. | |
const char * | rpmfiFLink (rpmfi fi) |
Return current file linkto (i.e. | |
rpmuint32_t | rpmfiFSize (rpmfi fi) |
Return current file size from file info set. | |
rpmuint16_t | rpmfiFRdev (rpmfi fi) |
Return current file rdev from file info set. | |
rpmuint32_t | rpmfiFInode (rpmfi fi) |
Return current file inode from file info set. | |
rpmuint32_t | rpmfiColor (rpmfi fi) |
Return union of all file color bits from file info set. | |
rpmuint32_t | rpmfiFColor (rpmfi fi) |
Return current file color bits from file info set. | |
const char * | rpmfiFClass (rpmfi fi) |
Return current file class from file info set. | |
const char * | rpmfiFContext (rpmfi fi) |
Return current file security context from file info set. | |
rpmuint32_t | rpmfiFDepends (rpmfi fi, const rpmuint32_t **fddictp) |
Return current file depends dictionary from file info set. | |
rpmuint32_t | rpmfiFNlink (rpmfi fi) |
Return (calculated) current file nlink count from file info set. | |
rpmuint32_t | rpmfiFMtime (rpmfi fi) |
Return current file modify time from file info set. | |
const char * | rpmfiFUser (rpmfi fi) |
Return current file owner from file info set. | |
const char * | rpmfiFGroup (rpmfi fi) |
Return current file group from file info set. | |
void * | rpmfiBloomFN (const rpmfi fi) |
Return file path Bloom filter. | |
void * | rpmfiExclude (const rpmfi fi) |
Return file info exclude patterns. | |
int | rpmfiNExclude (const rpmfi fi) |
Return no. | |
void * | rpmfiInclude (const rpmfi fi) |
Return file info include patterns. | |
int | rpmfiNInclude (const rpmfi fi) |
Return no. | |
struct fingerPrint_s * | rpmfiFpsIndex (rpmfi fi, int ix) |
void | rpmfiFpLookup (rpmfi fi, fingerPrintCache fpc) |
int | rpmfiNext (rpmfi fi) |
Return next file iterator index. | |
rpmfi | rpmfiInit (rpmfi fi, int fx) |
Initialize file iterator index. | |
int | rpmfiNextD (rpmfi fi) |
Return next directory iterator index. | |
rpmfi | rpmfiInitD (rpmfi fi, int dx) |
Initialize directory iterator index. | |
static const char * | rpmfiFtstring (rpmFileTypes ft) |
Identify a file type. | |
static rpmFileTypes | rpmfiWhatis (rpmuint16_t mode) |
Return file type from mode_t. | |
int | rpmfiCompare (const rpmfi afi, const rpmfi bfi) |
Return file info comparison. | |
int | rpmfiDecideFate (const rpmfi ofi, rpmfi nfi, int skipMissing) |
Return file disposition. | |
const char * | rpmfiTypeString (rpmfi fi) |
Return formatted string representation of package disposition. | |
static Header | relocateFileList (const rpmts ts, rpmfi fi, Header origH, iosmFileAction *actions) |
Relocate files in header. | |
int | rpmfiSetHeader (rpmfi fi, Header h) |
Link a header to a file info set. | |
static void | rpmfiFini (void *_fi) |
static rpmfi | rpmfiGetPool (rpmioPool pool) |
static unsigned char | nibble (char c) |
Convert hex to binary nibble. | |
rpmfi | rpmfiNew (const void *_ts, Header h, rpmTag tagN, int flags) |
Create and load a file info set. | |
int | rpmfiAddRelocation (rpmRelocation *relp, int *nrelp, const char *oldPath, const char *newPath) |
Add relocation element to array. | |
rpmRelocation | rpmfiFreeRelocations (rpmRelocation relocs) |
Free relocation array. | |
rpmRelocation | rpmfiDupeRelocations (rpmRelocation relocs, int *nrelocsp) |
Duplicate a relocation array. | |
int | rpmfiFStat (rpmfi fi, struct stat *st) |
Return current stat(2) data from file info set. | |
int | rpmfiStat (rpmfi fi, const char *path, struct stat *st) |
Return lstat(2) data of path from file info set. | |
void * | rpmfiOpendir (rpmfi fi, const char *name) |
Return directory stream onto file info set. | |
void | rpmfiBuildFClasses (Header h, const char ***fclassp, rpmuint32_t *fcp) |
Retrieve file classes from header. | |
void | rpmfiBuildFDeps (Header h, rpmTag tagN, const char ***fdepsp, rpmuint32_t *fcp) |
Retrieve per-file dependencies from header. |
Variables | |
int | _rpmfi_debug = 0 |
rpmioPool | _rpmfiPool |
Routines to handle file info tag sets.
Definition in file rpmfi.c.
#define _fdupedata | ( | _h, | |
_tag, | |||
_cast, | |||
_data | |||
) |
Definition at line 1397 of file rpmfi.c.
Referenced by rpmfiNew().
#define _fdupestring | ( | _h, | |
_tag, | |||
_data | |||
) |
Definition at line 1392 of file rpmfi.c.
Referenced by rpmfiNew().
#define alloca_strdup | ( | _s | ) | strcpy((char *)alloca(strlen(_s)+1), (_s)) |
Definition at line 777 of file rpmfi.c.
Referenced by relocateFileList().
|
inlinestatic |
Convert hex to binary nibble.
c | hex character |
Definition at line 1380 of file rpmfi.c.
Referenced by rpmfiNew().
|
static |
Relocate files in header.
ts | transaction set |
fi | transaction element file info |
origH | package header |
actions | file dispositions |
Definition at line 789 of file rpmfi.c.
References _free(), alloca(), alloca_strdup, rpmDataType_u::argv, _HE_s::c, D_, FA_SKIPNSTATE, headerGet(), headerIsEntry(), headerLink(), headerMod(), headerPut(), rpmRelocation_s::newPath, rpmRelocation_s::oldPath, _HE_s::p, rpmDataType_u::ptr, RPM_STRING_ARRAY_TYPE, RPM_UINT32_TYPE, rpmCleanPath(), rpmExpandNumeric(), rpmfiFtstring(), rpmfiWhatis(), rpmlog(), RPMLOG_DEBUG, RPMPROB_BADRELOCATE, RPMPROB_FILTER_FORCERELOCATE, rpmpsAppend(), rpmpsFree(), RPMTAG_BASENAMES, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILECOLORS, RPMTAG_FILEFLAGS, RPMTAG_FILEMODES, RPMTAG_INSTPREFIXES, RPMTAG_ORIGBASENAMES, RPMTAG_ORIGDIRINDEXES, RPMTAG_ORIGDIRNAMES, RPMTAG_PREFIXES, rpmteKey(), rpmteNEVR(), rpmtsFilterFlags(), rpmtsProblems(), rpmtsRelocateElement(), stpcpy(), stripTrailingChar(), _HE_s::t, _HE_s::tag, rpmDataType_u::ui16p, rpmDataType_u::ui32p, XDIR, xmalloc, and xrealloc.
Referenced by rpmfiNew().
int rpmfiAddRelocation | ( | rpmRelocation * | relp, |
int * | nrelp, | ||
const char * | oldPath, | ||
const char * | newPath | ||
) |
const char* rpmfiBN | ( | rpmfi | fi | ) |
Return current base name from file info set.
fi | file info set |
Definition at line 141 of file rpmfi.c.
Referenced by arSetup(), handleInstInstalledFile(), rpmfi_BN(), rpmfi_BN_get(), rpmtsFindBaseNamesInDB(), and rpmtsSkipFiles().
void rpmfiBuildFClasses | ( | Header | h, |
const char *** | fclassp, | ||
rpmuint32_t * | fcp | ||
) |
Retrieve file classes from header.
This function is used to retrieve file classes from the header.
h | header |
*fclassp | array of file classes |
*fcp | number of files |
Definition at line 1878 of file rpmfi.c.
References _free(), rpmfiFC(), rpmfiFClass(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, stpcpy(), and xmalloc.
Referenced by fileclassTag().
void rpmfiBuildFDeps | ( | Header | h, |
rpmTag | tagN, | ||
const char *** | fdepsp, | ||
rpmuint32_t * | fcp | ||
) |
Retrieve per-file dependencies from header.
This function is used to retrieve per-file dependencies from the header.
h | header |
tagN | RPMTAG_PROVIDENAME | RPMTAG_REQUIRENAME |
*fdepsp | array of file dependencies |
*fcp | number of files |
Definition at line 2137 of file rpmfi.c.
References _free(), rpmdsDNEVR(), rpmdsFree(), rpmdsNew(), rpmdsNext(), rpmdsSetIx(), rpmfiFC(), rpmfiFDepends(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME, stpcpy(), and xmalloc.
Referenced by fileprovideTag(), and filerequireTag().
rpmuint32_t rpmfiColor | ( | rpmfi | fi | ) |
Return file info comparison.
afi | 1st file info |
bfi | 2nd file info |
Definition at line 637 of file rpmfi.c.
References LINK, REG, rpmfiDigest(), rpmfiFLink(), rpmfiFMode(), and rpmfiWhatis().
Referenced by handleInstInstalledFile(), and handleOverlappedFiles().
int rpmfiDC | ( | rpmfi | fi | ) |
Return directory count from file info set.
fi | file info set |
Definition at line 92 of file rpmfi.c.
Referenced by rpmfi_DC(), rpmfi_DC_get(), and rpmtsSkipFiles().
Return file disposition.
ofi | old file info |
nfi | new file info |
skipMissing | OK to skip missing files? |
Definition at line 671 of file rpmfi.c.
References D_, dodigest(), FA_ALTNAME, FA_CREATE, FA_SAVE, FA_SKIP, LINK, Lstat(), Readlink(), REG, rpmfiDigest(), rpmfiFFlags(), rpmfiFLink(), rpmfiFMode(), rpmfiFN(), RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMFILE_SPARSE, rpmfiWhatis(), rpmlog(), RPMLOG_DEBUG, and XDIR.
Referenced by handleInstInstalledFile().
const unsigned char* rpmfiDigest | ( | rpmfi | fi, |
int * | algop, | ||
size_t * | lenp | ||
) |
Return current file (binary) digest from file info set.
fi | file info set |
*algop | digest algorithm |
*lenp | digest length (in bytes) |
Definition at line 300 of file rpmfi.c.
Referenced by handleOverlappedFiles(), rpmfi_Digest(), rpmfi_FDigest_get(), rpmfiCompare(), rpmfiDecideFate(), and showQueryPackage().
const char* rpmfiDN | ( | rpmfi | fi | ) |
Return current directory name from file info set.
fi | file info set |
Definition at line 152 of file rpmfi.c.
Referenced by handleInstInstalledFile(), rpmfi_DN(), rpmfi_DN_get(), and rpmtsSkipFiles().
rpmRelocation rpmfiDupeRelocations | ( | rpmRelocation | relocs, |
int * | nrelocsp | ||
) |
Duplicate a relocation array.
relocs | relocation array |
*nrelocsp | no. of elements |
Definition at line 1751 of file rpmfi.c.
References rpmRelocation_s::newPath, rpmRelocation_s::oldPath, xmalloc, and xstrdup().
Referenced by addTE().
int rpmfiDX | ( | rpmfi | fi | ) |
Return current directory index from file info set.
fi | file info set |
Definition at line 120 of file rpmfi.c.
Referenced by rpmfi_DX(), rpmfi_DX_get(), rpmfi_DX_set(), and rpmtsSkipFiles().
int rpmfiFC | ( | rpmfi | fi | ) |
Return file count from file info set.
fi | file info set |
Definition at line 87 of file rpmfi.c.
Referenced by mapFind(), pkgUnpackagedSubdirs(), postPopulateInstallHeader(), removePackage(), rpmfcGenerateDepends(), rpmfi_FC(), rpmfi_FC_get(), rpmfi_length(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmpsmStage(), rpmteColorDS(), rpmtsAddFingerprints(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), rpmtsPrepare(), rpmtsSanityCheck(), showQueryPackage(), and showVerifyPackage().
const char* rpmfiFClass | ( | rpmfi | fi | ) |
Return current file class from file info set.
fi | file info set |
Definition at line 383 of file rpmfi.c.
Referenced by rpmfi_FClass(), rpmfi_FClass_get(), and rpmfiBuildFClasses().
rpmuint32_t rpmfiFColor | ( | rpmfi | fi | ) |
Return current file color bits from file info set.
fi | file info set |
Definition at line 371 of file rpmfi.c.
Referenced by handleInstInstalledFile(), handleOverlappedFiles(), rpmfi_FColor(), rpmfi_FColor_get(), rpmteColorDS(), and rpmtsSkipFiles().
const char* rpmfiFContext | ( | rpmfi | fi | ) |
rpmuint32_t rpmfiFDepends | ( | rpmfi | fi, |
const rpmuint32_t ** | fddictp | ||
) |
Return current file depends dictionary from file info set.
fi | file info set |
*fddictp | file depends dictionary array (or NULL) |
Definition at line 406 of file rpmfi.c.
Referenced by rpmfiBuildFDeps(), and rpmteColorDS().
rpmuint32_t rpmfiFFlags | ( | rpmfi | fi | ) |
Return current file flags from file info set.
fi | file info set |
Definition at line 217 of file rpmfi.c.
Referenced by handleInstInstalledFile(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FFlags(), rpmfi_FFlags_get(), rpmfi_iternext(), rpmfiDecideFate(), rpmInstallSourcePackage(), rpmtsSkipFiles(), and showQueryPackage().
const char* rpmfiFGroup | ( | rpmfi | fi | ) |
Return current file group from file info set.
fi | file info set |
Definition at line 470 of file rpmfi.c.
Referenced by rpmfi_FGroup(), rpmfi_FGroup_get(), rpmfi_iternext(), and showQueryPackage().
|
static |
Definition at line 1287 of file rpmfi.c.
References _free(), freeFSM(), headerFree(), and mireFreeAll().
Referenced by rpmfiGetPool().
rpmuint32_t rpmfiFInode | ( | rpmfi | fi | ) |
Return current file inode from file info set.
fi | file info set |
Definition at line 350 of file rpmfi.c.
Referenced by rpmfi_iternext().
const char* rpmfiFLink | ( | rpmfi | fi | ) |
Return current file linkto (i.e.
symlink(2) target) from file info set.
fi | file info set |
Definition at line 317 of file rpmfi.c.
Referenced by rpmfi_FLink(), rpmfi_FLink_get(), rpmfiCompare(), rpmfiDecideFate(), rpmtsAddFingerprints(), and showQueryPackage().
rpmuint16_t rpmfiFMode | ( | rpmfi | fi | ) |
Return current file mode from file info set.
fi | file info set |
Definition at line 265 of file rpmfi.c.
Referenced by fiIntersect(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FMode(), rpmfi_FMode_get(), rpmfi_iternext(), rpmfiCompare(), rpmfiDecideFate(), rpmtsSkipFiles(), and showQueryPackage().
rpmuint32_t rpmfiFMtime | ( | rpmfi | fi | ) |
Return current file modify time from file info set.
fi | file info set |
Definition at line 447 of file rpmfi.c.
Referenced by rpmfi_FMtime(), rpmfi_FMtime_get(), rpmfi_iternext(), and showQueryPackage().
const char* rpmfiFN | ( | rpmfi | fi | ) |
Return current file name from file info set.
fi | file info set |
Definition at line 163 of file rpmfi.c.
References stpcpy(), urlPath(), and xmalloc.
Referenced by _rpmtsCheck(), checkUnpackagedFiles(), fiIntersect(), handleOverlappedFiles(), pkgUnpackagedSubdirs(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_FN(), rpmfi_FN_get(), rpmfi_iternext(), rpmfi_print(), rpmfi_subscript(), rpmfiDecideFate(), rpmfiOpendir(), rpmfiStat(), rpmInstallSourcePackage(), and showQueryPackage().
void* rpmfiFNBF | ( | rpmfi | fi | ) |
Return FN Bloom filter from file info set.
fi | file info set |
Definition at line 181 of file rpmfi.c.
References alloca(), stpcpy(), and urlPath().
Referenced by packagedDir(), and rpmalAdd().
rpmuint32_t rpmfiFNlink | ( | rpmfi | fi | ) |
Return (calculated) current file nlink count from file info set.
fi | file info set |
Definition at line 427 of file rpmfi.c.
Referenced by rpmfi_iternext(), rpmfiFStat(), rpmvfNew(), and showQueryPackage().
size_t rpmfiFNMaxLen | ( | rpmfi | fi | ) |
Return maximum file name length from file info set.
fi | file info set |
Definition at line 212 of file rpmfi.c.
Referenced by pkgUnpackagedSubdirs().
void rpmfiFpLookup | ( | rpmfi | fi, |
fingerPrintCache | fpc | ||
) |
Definition at line 518 of file rpmfi.c.
References fpLookupList(), and xcalloc().
Referenced by rpmtsAddFingerprints().
|
read |
Definition at line 509 of file rpmfi.c.
Referenced by handleOverlappedFiles(), and rpmtsAddFingerprints().
rpmuint16_t rpmfiFRdev | ( | rpmfi | fi | ) |
Return current file rdev from file info set.
fi | file info set |
Definition at line 339 of file rpmfi.c.
Referenced by rpmfi_FRdev(), rpmfi_FRdev_get(), rpmfi_iternext(), and showQueryPackage().
rpmRelocation rpmfiFreeRelocations | ( | rpmRelocation | relocs | ) |
Free relocation array.
relocs | relocation array |
Definition at line 1738 of file rpmfi.c.
References _free(), rpmRelocation_s::newPath, and rpmRelocation_s::oldPath.
rpmuint32_t rpmfiFSize | ( | rpmfi | fi | ) |
Return current file size from file info set.
fi | file info set |
Definition at line 328 of file rpmfi.c.
Referenced by handleInstInstalledFile(), handleOverlappedFiles(), rpmfi_FSize(), rpmfi_FSize_get(), rpmfi_iternext(), and showQueryPackage().
int rpmfiFStat | ( | rpmfi | fi, |
struct stat * | st | ||
) |
Return current stat(2) data from file info set.
fi | file info set |
*st | stat(2) data |
Definition at line 1776 of file rpmfi.c.
References gnameToGid(), rpmfiFNlink(), and unameToUid().
Referenced by rpmfiStat().
rpmfileState rpmfiFState | ( | rpmfi | fi | ) |
Return current file state from file info set.
fi | file info set |
Definition at line 276 of file rpmfi.c.
References RPMFILE_STATE_MISSING.
Referenced by handleOverlappedFiles(), rpmfi_FState(), rpmfi_FState_get(), rpmfi_iternext(), and showQueryPackage().
|
static |
const char* rpmfiFUser | ( | rpmfi | fi | ) |
Return current file owner from file info set.
fi | file info set |
Definition at line 458 of file rpmfi.c.
Referenced by rpmfi_FUser(), rpmfi_FUser_get(), rpmfi_iternext(), and showQueryPackage().
int rpmfiFX | ( | rpmfi | fi | ) |
Return current file index from file info set.
fi | file info set |
Definition at line 103 of file rpmfi.c.
Referenced by handleInstInstalledFile(), rpmfi_FX(), rpmfi_FX_get(), and rpmfi_FX_set().
Definition at line 1359 of file rpmfi.c.
References _rpmfiPool, rpmfiFini(), rpmioGetPool(), and rpmioNewPool().
Referenced by rpmfiNew().
Initialize file iterator index.
fi | file info set |
fx | file iterator index |
Definition at line 548 of file rpmfi.c.
Referenced by _rpmtsCheck(), arSetup(), checkUnpackagedFiles(), dnlInitIterator(), fiIntersect(), handleOverlappedFiles(), pkgUnpackagedSubdirs(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_iternext(), rpmfi_print(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmfiOpendir(), rpmfiStat(), rpmInstallSourcePackage(), rpmteColorDS(), rpmtsAddFingerprints(), rpmtsFindBaseNamesInDB(), rpmtsPrepare(), rpmtsSkipFiles(), and showQueryPackage().
Initialize directory iterator index.
fi | file info set |
dx | directory iterator index |
Definition at line 582 of file rpmfi.c.
Referenced by rpmtsSkipFiles().
int rpmfiIsSource | ( | rpmfi | fi | ) |
Create and load a file info set.
_ts | transaction set (NULL skips path relocation) |
h | header |
tagN | RPMTAG_BASENAMES |
flags | scareMem(0x1), nofilter(0x2) |
Definition at line 1403 of file rpmfi.c.
References _fdupedata, _fdupestring, _free(), alloca(), rpmDataType_u::argv, argvFree(), _HE_s::c, FA_UNKNOWN, headerFree(), headerGet(), headerIsEntry(), headerLink(), headerMacrosLoad(), headerMacrosUnload(), headerSprintf(), IOSM_MAP_GID, IOSM_MAP_MODE, IOSM_MAP_PATH, IOSM_MAP_UID, newFSM(), rpmRelocation_s::newPath, nibble(), _HE_s::p, PGPHASHALGO_CRC32, PGPHASHALGO_ERROR, PGPHASHALGO_MD2, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_RIPEMD256, PGPHASHALGO_RIPEMD320, PGPHASHALGO_SHA1, PGPHASHALGO_SHA224, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, rpmDataType_u::ptr, relocateFileList(), rpmfiGetPool(), RPMFILE_ICON, RPMFILE_PATCH, RPMFILE_SOURCE, RPMFILE_SPECFILE, rpmfiLink(), rpmGenPath(), rpmGetPath(), rpmHeaderFormats, RPMTAG_ARCH, RPMTAG_ARCHIVESIZE, RPMTAG_BASENAMES, RPMTAG_CLASSDICT, RPMTAG_DEPENDSDICT, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILECLASS, RPMTAG_FILECOLORS, RPMTAG_FILECONTEXTS, RPMTAG_FILEDEPENDSN, RPMTAG_FILEDEPENDSX, RPMTAG_FILEDIGESTALGO, RPMTAG_FILEDIGESTALGOS, RPMTAG_FILEDIGESTS, RPMTAG_FILEFLAGS, RPMTAG_FILEGROUPNAME, RPMTAG_FILEINODES, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMODES, RPMTAG_FILEMTIMES, RPMTAG_FILERDEVS, RPMTAG_FILESIZES, RPMTAG_FILESTATES, RPMTAG_FILEUSERNAME, RPMTAG_FILEVERIFYFLAGS, RPMTAG_OLDFILENAMES, RPMTAG_ORIGBASENAMES, RPMTAG_POSTTRANS, RPMTAG_POSTTRANSPROG, RPMTAG_PRETRANS, RPMTAG_PRETRANSPROG, RPMTAG_REMOVETID, RPMTAG_RPMVERSION, RPMTAG_SOURCERPM, RPMTAG_VERIFYSCRIPT, RPMTAG_VERIFYSCRIPTPROG, rpmteType(), rpmtsRelocateElement(), rpmtsRootDir(), stpcpy(), _HE_s::tag, TR_ADDED, rpmDataType_u::ui32p, xcalloc(), xmalloc, xrealloc, and xstrdup().
Referenced by addTE(), checkDuplicateFiles(), checkUnpackagedFiles(), genCpioListAndHeader(), hdr_fiFromHeader(), pkgUnpackagedSubdirs(), rpmfi_init(), rpmfi_new(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmhdr_fi(), rpmteOpen(), rpmtsCheckInstalledFiles(), rpmtsProcess(), showQueryPackage(), and showVerifyPackage().
int rpmfiNext | ( | rpmfi | fi | ) |
Return next file iterator index.
fi | file info set |
Definition at line 526 of file rpmfi.c.
Referenced by _rpmtsCheck(), arSetup(), checkUnpackagedFiles(), dnlInitIterator(), fiIntersect(), handleOverlappedFiles(), pkgUnpackagedSubdirs(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_FX_set(), rpmfi_iternext(), rpmfi_print(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmfiOpendir(), rpmfiStat(), rpmInstallSourcePackage(), rpmteColorDS(), rpmtsAddFingerprints(), rpmtsFindBaseNamesInDB(), rpmtsPrepare(), rpmtsSkipFiles(), and showQueryPackage().
int rpmfiNextD | ( | rpmfi | fi | ) |
Return next directory iterator index.
fi | file info set |
Definition at line 562 of file rpmfi.c.
Referenced by rpmfi_DX_set(), and rpmtsSkipFiles().
void* rpmfiOpendir | ( | rpmfi | fi, |
const char * | name | ||
) |
Return directory stream onto file info set.
fi | file info set |
name | directory path |
Definition at line 1834 of file rpmfi.c.
References _free(), argvAdd(), argvFree(), name, rpmfiFN(), rpmfiInit(), rpmfiNext(), and xcalloc().
int rpmfiSetDX | ( | rpmfi | fi, |
int | dx | ||
) |
Set current directory index in file info set.
fi | file info set |
dx | new directory index |
Definition at line 125 of file rpmfi.c.
Referenced by rpmfi_DX_set().
rpmuint32_t rpmfiSetFFlags | ( | rpmfi | fi, |
rpmuint32_t | FFlags | ||
) |
rpmfileState rpmfiSetFState | ( | rpmfi | fi, |
rpmfileState | fstate | ||
) |
int rpmfiSetFX | ( | rpmfi | fi, |
int | fx | ||
) |
Set current file index in file info set.
fi | file info set |
fx | new file index |
Definition at line 108 of file rpmfi.c.
Referenced by handleOverlappedFiles(), rpmfi_FX_set(), rpmfi_subscript(), and rpmtsCheckInstalledFiles().
Link a header to a file info set.
fi | file info set |
h | header |
Definition at line 1275 of file rpmfi.c.
References headerFree(), and headerLink().
Referenced by checkDuplicateFiles(), and showVerifyPackage().
rpmuint32_t rpmfiSetVFlags | ( | rpmfi | fi, |
rpmuint32_t | VFlags | ||
) |
int rpmfiStat | ( | rpmfi | fi, |
const char * | path, | ||
struct stat * | st | ||
) |
Return lstat(2) data of path from file info set.
fi | file info set |
path | file path |
*st | stat(2) data |
Definition at line 1803 of file rpmfi.c.
References rpmfiFN(), rpmfiFStat(), rpmfiInit(), and rpmfiNext().
const char* rpmfiTypeString | ( | rpmfi | fi | ) |
Return formatted string representation of package disposition.
fi | file info set |
Definition at line 767 of file rpmfi.c.
References rpmteType(), TR_ADDED, and TR_REMOVED.
Referenced by fsmStage().
rpmuint32_t rpmfiVFlags | ( | rpmfi | fi | ) |
Return current file verify flags from file info set.
fi | file info set |
Definition at line 241 of file rpmfi.c.
Referenced by rpmfi_iternext(), rpmfi_VFlags(), and rpmfi_VFlags_get().
|
static |
Return file type from mode_t.
mode | file mode bits (from header) |
Definition at line 623 of file rpmfi.c.
References BDEV, CDEV, LINK, PIPE, REG, S_ISLNK, S_ISSOCK, SOCK, and XDIR.
Referenced by relocateFileList(), rpmfiCompare(), and rpmfiDecideFate().
|
static |
Remove occurrences of trailing character from string.
s | string |
c | character to strip |
Definition at line 76 of file rpmfi.c.
Referenced by relocateFileList().
int _rpmfi_debug = 0 |
Definition at line 67 of file rpmfi.c.
Referenced by rpmfi_alloc(), rpmfi_Debug(), rpmfi_free(), rpmfi_init(), and rpmfi_new().
rpmioPool _rpmfiPool |
Definition at line 1357 of file rpmfi.c.
Referenced by rpmfiGetPool().