# lib/rpmfi.h File Reference

Structure(s) used for file info tag sets. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## RPMFI
#define | rpmfiUnlink(_fi, _msg) XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)
#define | rpmfiLink(_fi, _msg) XrpmfiLink(_fi, _msg, __FILE__, __LINE__)
rpmfi | rpmfiUnlink (rpmfi fi, const char *msg)
| Unreference a file info set instance.
rpmfi | XrpmfiUnlink (rpmfi fi, const char *msg, const char *fn, unsigned ln)
rpmfi | rpmfiLink (rpmfi fi, const char *msg)
| Reference a file info set instance.
rpmfi | XrpmfiLink (rpmfi fi, const char *msg, const char *fn, unsigned ln)
int | rpmfiFC (rpmfi fi)
| Return file 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 | rpmfiDC (rpmfi fi)
| Return directory count from 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.
uint32_t | rpmfiFFlags (rpmfi fi)
| Return current file flags from file info set.
uint32_t | rpmfiSetFFlags (rpmfi fi, uint32_t FFlags)
| Set current file flags in file info set.
uint32_t | rpmfiVFlags (rpmfi fi)
| Return current file verify flags from file info set.
uint32_t | rpmfiSetVFlags (rpmfi fi, uint32_t VFlags)
| Set current file verify flags in file info set.
uint16_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.
uint32_t | rpmfiFSize (rpmfi fi)
| Return current file size from file info set.
uint16_t | rpmfiFRdev (rpmfi fi)
| Return current file rdev from file info set.
uint32_t | rpmfiFInode (rpmfi fi)
| Return current file inode from file info set.
uint32_t | rpmfiColor (rpmfi fi)
| Return union of all file color bits from file info set.
uint32_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.
uint32_t | rpmfiFDepends (rpmfi fi, const uint32_t **fddictp)
| Return current file depends dictionary from file info set.
uint32_t | rpmfiFNlink (rpmfi fi)
| Return (calculated) current file nlink count from file info set.
uint32_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.
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.
rpmfi | rpmfiFree (rpmfi fi)
| Destroy a file info set.
rpmfi | rpmfiNew (const rpmts ts, Header h, rpmTag tagN, int flags)
| Create and load a file info set.
void | rpmfiBuildFClasses (Header h, const char ***fclassp, uint32_t *fcp)
| Retrieve file classes from header.
void | rpmfiBuildFContexts (Header h, const char ***fcontextp, uint32_t *fcp)
| Retrieve file security contexts from header.
void | rpmfiBuildFSContexts (Header h, const char ***fcontextp, uint32_t *fcp)
| Retrieve file security contexts from file system.
void | rpmfiBuildREContexts (Header h, const char ***fcontextp, uint32_t *fcp)
| Retrieve file security contexts from policy RE's.
void | rpmfiBuildFDeps (Header h, rpmTag tagN, const char ***fdepsp, uint32_t *fcp)
| Retrieve per-file dependencies from header.
int | rpmfiCompare (const rpmfi afi, const rpmfi bfi)
| Return file info comparison.
fileAction | rpmfiDecideFate (const rpmfi ofi, rpmfi nfi, int skipMissing)
| Return file disposition.
const char * | rpmfiTypeString (rpmfi fi)
| Return formatted string representation of package disposition.
## Defines
#define | RPMFILE_STATE_MISSING -1
#define | RPMFILE_SPOOK (RPMFILE_GHOST|RPMFILE_TYPED)
#define | RPMFILE_ALL ~(RPMFILE_NONE)
## Typedefs
typedef enum rpmFileTypes_e | rpmFileTypes
| File types.
typedef enum rpmfileState_e | rpmfileState
| File States (when installed).
typedef enum rpmfileAttrs_e | rpmfileAttrs
| File Attributes.
typedef enum fileAction_e | fileAction
| File disposition(s) during package install/erase transaction.
## Enumerations
enum | rpmFileTypes_e { PIPE = 1, CDEV = 2, XDIR = 4, BDEV = 6, REG = 8, LINK = 10, SOCK = 12 }
| File types. More...
enum | rpmfileState_e { RPMFILE_STATE_NORMAL = 0, RPMFILE_STATE_REPLACED = 1, RPMFILE_STATE_NOTINSTALLED = 2, RPMFILE_STATE_NETSHARED = 3, RPMFILE_STATE_WRONGCOLOR = 4 }
| File States (when installed). More...
enum | rpmfileAttrs_e { RPMFILE_NONE = 0, RPMFILE_CONFIG = (1 << 0), RPMFILE_DOC = (1 << 1), RPMFILE_ICON = (1 << 2), RPMFILE_MISSINGOK = (1 << 3), RPMFILE_NOREPLACE = (1 << 4), RPMFILE_SPECFILE = (1 << 5), RPMFILE_GHOST = (1 << 6), RPMFILE_LICENSE = (1 << 7), RPMFILE_README = (1 << 8), RPMFILE_EXCLUDE = (1 << 9), RPMFILE_UNPATCHED = (1 << 10), RPMFILE_PUBKEY = (1 << 11), RPMFILE_POLICY = (1 << 12), RPMFILE_EXISTS = (1 << 13), RPMFILE_SPARSE = (1 << 14), RPMFILE_TYPED = (1 << 15), RPMFILE_SOURCE = (1 << 16), RPMFILE_PATCH = (1 << 17), RPMFILE_OPTIONAL = (1 << 18) }
| File Attributes. More...
enum | fileAction_e { FA_UNKNOWN = 0, FA_CREATE, FA_COPYIN, FA_COPYOUT, FA_BACKUP, FA_SAVE, FA_SKIP, FA_ALTNAME, FA_ERASE, FA_SKIPNSTATE, FA_SKIPNETSHARED, FA_SKIPCOLOR }
| File disposition(s) during package install/erase transaction. More...
## Variables
int | _rpmfi_debug

## Detailed Description

Structure(s) used for file info tag sets.

Definition in file rpmfi.h.

## Define Documentation

#define RPMFILE_ALL ~(RPMFILE_NONE)

Definition at line 72 of file rpmfi.h.

#define RPMFILE_SPOOK (RPMFILE_GHOST|RPMFILE_TYPED)

Definition at line 71 of file rpmfi.h.

#define RPMFILE_STATE_MISSING -1

Definition at line 41 of file rpmfi.h.

Referenced by rpmfiFState(), and showQueryPackage().

#define rpmfiLink | ( | _fi,
|  | _msg |  | ) | XrpmfiLink(_fi, _msg, __FILE__, __LINE__)

Definition at line 299 of file rpmfi.h.

Referenced by mapInitIterator(), packageBinaries(), packageSources(), rpmalAdd(), rpmfiNew(), rpmInstallSourcePackage(), rpmpsmNew(), rpmte_FI(), rpmtsRun(), and verifyHeader().

#define rpmfiUnlink | ( | _fi,
|  | _msg |  | ) | XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)

Definition at line 276 of file rpmfi.h.

Referenced by mapFreeIterator(), rpmalAdd(), rpmfiFree(), and verifyHeader().

## Typedef Documentation

typedef enum fileAction_e fileAction

File disposition(s) during package install/erase transaction.

typedef enum rpmfileAttrs_e rpmfileAttrs

File Attributes.

typedef enum rpmfileState_e rpmfileState

File States (when installed).

typedef enum rpmFileTypes_e rpmFileTypes

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

## Enumeration Type Documentation

enum fileAction_e

File disposition(s) during package install/erase transaction.

Enumerator:

  FA_UNKNOWN | initial action for file ...
  FA_CREATE | ... copy in from payload.
  FA_COPYIN | ... copy in from payload.
  FA_COPYOUT | ... copy out to payload.
  FA_BACKUP | ... renamed with ".rpmorig" extension.
  FA_SAVE | ... renamed with ".rpmsave" extension.
  FA_SKIP | ... already replaced, don't remove.
  FA_ALTNAME | ... create with ".rpmnew" extension.
  FA_ERASE | ... to be removed.
  FA_SKIPNSTATE | ... untouched, state "not installed".
  FA_SKIPNETSHARED | ... untouched, state "netshared".
  FA_SKIPCOLOR | ... untouched, state "wrong color".

Definition at line 77 of file rpmfi.h.

enum rpmfileAttrs_e

File Attributes.

Enumerator:

  RPMFILE_NONE |
  RPMFILE_CONFIG | from %config
  RPMFILE_DOC | from %doc
  RPMFILE_ICON | from Icon:
  RPMFILE_MISSINGOK | from %config(missingok)
  RPMFILE_NOREPLACE | from %config(noreplace)
  RPMFILE_SPECFILE | the specfile (srpm only).
  RPMFILE_GHOST | from %ghost
  RPMFILE_LICENSE | from %license
  RPMFILE_README | from %readme
  RPMFILE_EXCLUDE | from %exclude, internal
  RPMFILE_UNPATCHED | (deprecated) placeholder (SuSE)
  RPMFILE_PUBKEY | from %pubkey
  RPMFILE_POLICY | from %policy
  RPMFILE_EXISTS | did lstat(fn, st) succeed?
  RPMFILE_SPARSE | was ((512*st->st_blocks) < st->st_size) ?
  RPMFILE_TYPED | (unimplemented) from %spook
  RPMFILE_SOURCE | from SourceN: (srpm only).
  RPMFILE_PATCH | from PatchN: (srpm only).
  RPMFILE_OPTIONAL | from %optional.

Definition at line 46 of file rpmfi.h.

enum rpmfileState_e

File States (when installed).

Enumerator:

  RPMFILE_STATE_NORMAL |
  RPMFILE_STATE_REPLACED |
  RPMFILE_STATE_NOTINSTALLED |
  RPMFILE_STATE_NETSHARED |
  RPMFILE_STATE_WRONGCOLOR |

Definition at line 34 of file rpmfi.h.

enum rpmFileTypes_e

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

Enumerator:

  PIPE | pipe/fifo
  CDEV | character device
  XDIR | directory
  BDEV | block device
  REG | regular file
  LINK | hard link
  SOCK | socket

Definition at line 21 of file rpmfi.h.

## Function Documentation

const char* rpmfiBN | ( | rpmfi | fi | ) |

Return current base name from file info set.

Parameters:

  | fi | file info set

Returns:
  current base name, NULL on invalid

Definition at line 111 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), rpmalAdd(), rpmfi_BN(), and skipFiles().

void rpmfiBuildFClasses | ( | Header | h,
|  | const char *** | fclassp,
|  | uint32_t * | fcp |
| ) |  |  |

Retrieve file classes from header.

This function is used to retrieve file classes from the header.

Parameters:

  | h | header

Return values:

  | *fclassp | array of file classes
  | *fcp | number of files

Definition at line 1557 of file rpmfi.c.

References _free(), rpmfiFC(), rpmfiFClass(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, stpcpy(), and xmalloc().

Referenced by fileclassTag().

void rpmfiBuildFContexts | ( | Header | h,
|  | const char *** | fcontextp,
|  | uint32_t * | fcp |
| ) |  |  |

Retrieve file security contexts from header.

This function is used to retrieve file contexts from the header.

Parameters:

  | h | header

Return values:

  | *fcontextp | array of file contexts
  | *fcp | number of files

Definition at line 1609 of file rpmfi.c.

References _free(), rpmfiFC(), rpmfiFContext(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, stpcpy(), and xmalloc().

Referenced by filecontextsTag().

void rpmfiBuildFDeps | ( | Header | h,
|  | rpmTag | tagN,
|  | const char *** | fdepsp,
|  | uint32_t * | fcp |
| ) |  |  |

Retrieve per-file dependencies from header.

This function is used to retrieve per-file dependencies from the header.

Parameters:

  | h | header
  | tagN | RPMTAG_PROVIDENAME | RPMTAG_REQUIRENAME

Return values:

  | *fdepsp | array of file dependencies
  | *fcp | number of files

Definition at line 1814 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().

void rpmfiBuildFSContexts | ( | Header | h,
|  | const char *** | fcontextp,
|  | uint32_t * | fcp |
| ) |  |  |

Retrieve file security contexts from file system.

This function is used to retrieve file contexts from the file system.

Parameters:

  | h | header

Return values:

  | *fcontextp | array of file contexts
  | *fcp | number of files

Definition at line 1661 of file rpmfi.c.

References _free(), alloca(), freecon, lgetfilecon, rpmfiFC(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), RPMTAG_BASENAMES, xmalloc(), and xrealloc().

Referenced by fscontextsTag().

void rpmfiBuildREContexts | ( | Header | h,
|  | const char *** | fcontextp,
|  | uint32_t * | fcp |
| ) |  |  |

Retrieve file security contexts from policy RE's.

This function is used to retrieve file contexts from policy RE's.

Parameters:

  | h | header

Return values:

  | *fcontextp | array of file contexts
  | *fcp | number of files

Definition at line 1729 of file rpmfi.c.

References _free(), alloca(), freecon, matchpathcon, matchpathcon_fini, matchpathcon_init, rpmfiFC(), rpmfiFMode(), rpmfiFN(), rpmfiFree(), rpmfiInit(), rpmfiNew(), rpmfiNext(), rpmGetPath(), RPMTAG_BASENAMES, xmalloc(), and xrealloc().

Referenced by recontextsTag().

uint32_t rpmfiColor | ( | rpmfi | fi | ) |

Return union of all file color bits from file info set.

Parameters:

  | fi | file info set

Returns:
  current color

Definition at line 295 of file rpmfi.c.

int rpmfiCompare | ( | const rpmfi | afi,
|  | const rpmfi | bfi |
| ) |  |  |

Return file info comparison.

Parameters:

  | afi | 1st file info
  | bfi | 2nd file info

Returns:
  0 if identical

Definition at line 528 of file rpmfi.c.

References LINK, REG, rpmfiDigest(), rpmfiFLink(), rpmfiFMode(), and rpmfiWhatis().

Referenced by handleInstInstalledFiles(), and handleOverlappedFiles().

int rpmfiDC | ( | rpmfi | fi | ) |

Return directory count from file info set.

Parameters:

  | fi | file info set

Returns:
  current directory count

Definition at line 62 of file rpmfi.c.

Referenced by rpmalAdd(), rpmalDel(), rpmfi_DC(), and skipFiles().

fileAction rpmfiDecideFate | ( | const rpmfi | ofi,
|  | rpmfi | nfi,
|  | int | skipMissing |
| ) |  |  |

Return file disposition.

Parameters:

  | ofi | old file info
  | nfi | new file info
  | skipMissing | OK to skip missing files?

Returns:
  file dispostion

Definition at line 562 of file rpmfi.c.

References D_, dodigest(), FA_ALTNAME, FA_CREATE, FA_SAVE, FA_SKIP, LINK, Lstat(), REG, rpmfiDigest(), rpmfiFFlags(), rpmfiFLink(), rpmfiFMode(), rpmfiFN(), RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, RPMFILE_SPARSE, rpmfiWhatis(), rpmlog(), RPMLOG_DEBUG, save(), and XDIR.

Referenced by handleInstInstalledFiles().

const unsigned char* rpmfiDigest | ( | rpmfi | fi,
|  | int * | algop,
|  | size_t * | lenp |
| ) |  |  |

Return current file (binary) digest from file info set.

Parameters:

  | fi | file info set

Return values:

  | *algop | digest algorithm
  | *lenp | digest length (in bytes)

Returns:
  current file digest, NULL on invalid

Definition at line 234 of file rpmfi.c.

Referenced by handleOverlappedFiles(), rpmfi_iternext(), rpmfi_MD5(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiDN | ( | rpmfi | fi | ) |

Return current directory name from file info set.

Parameters:

  | fi | file info set

Returns:
  current directory, NULL on invalid

Definition at line 122 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), rpmalAdd(), rpmalDel(), rpmfi_DN(), and skipFiles().

int rpmfiDX | ( | rpmfi | fi | ) |

Return current directory index from file info set.

Parameters:

  | fi | file info set

Returns:
  current directory index

Definition at line 90 of file rpmfi.c.

Referenced by rpmalAdd(), rpmfi_DX(), and skipFiles().

int rpmfiFC | ( | rpmfi | fi | ) |

Return file count from file info set.

Parameters:

  | fi | file info set

Returns:
  current file count

Definition at line 57 of file rpmfi.c.

Referenced by handleOverlappedFiles(), markReplacedFiles(), populateInstallHeader(), postPopulateInstallHeader(), rpmalAdd(), rpmalDel(), rpmfcGenerateDepends(), rpmfi_FC(), rpmfi_length(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmpsmStage(), rpmteColorDS(), rpmtsCheckDSIProblems(), rpmtsRun(), and showQueryPackage().

const char* rpmfiFClass | ( | rpmfi | fi | ) |

Return current file class from file info set.

Parameters:

  | fi | file info set

Returns:
  current file class, 0 on invalid

Definition at line 317 of file rpmfi.c.

Referenced by rpmfi_FClass(), and rpmfiBuildFClasses().

uint32_t rpmfiFColor | ( | rpmfi | fi | ) |

Return current file color bits from file info set.

Parameters:

  | fi | file info set

Returns:
  current file color

Definition at line 305 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmalAdd(), rpmfi_FColor(), rpmteColorDS(), and skipFiles().

const char* rpmfiFContext | ( | rpmfi | fi | ) |

Return current file security context from file info set.

Parameters:

  | fi | file info set

Returns:
  current file context, 0 on invalid

Definition at line 330 of file rpmfi.c.

Referenced by rpmfiBuildFContexts().

uint32_t rpmfiFDepends | ( | rpmfi | fi,
|  | const uint32_t ** | fddictp |
| ) |  |  |

Return current file depends dictionary from file info set.

Parameters:

  | fi | file info set

Return values:

  | *fddictp | file depends dictionary array (or NULL)

Returns:
  no. of file depends entries, 0 on invalid

Definition at line 341 of file rpmfi.c.

Referenced by rpmfiBuildFDeps(), and rpmteColorDS().

uint32_t rpmfiFFlags | ( | rpmfi | fi | ) |

Return current file flags from file info set.

Parameters:

  | fi | file info set

Returns:
  current file flags, 0 on invalid

Definition at line 151 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FFlags(), rpmfi_iternext(), rpmfiDecideFate(), rpmtsRun(), rpmVerifyFile(), showQueryPackage(), skipFiles(), and verifyHeader().

const char* rpmfiFGroup | ( | rpmfi | fi | ) |

Return current file group from file info set.

Parameters:

  | fi | file info set

Returns:
  current file group, NULL on invalid

Definition at line 405 of file rpmfi.c.

Referenced by rpmfi_FGroup(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

uint32_t rpmfiFInode | ( | rpmfi | fi | ) |

Return current file inode from file info set.

Parameters:

  | fi | file info set

Returns:
  current file inode, 0 on invalid

Definition at line 284 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.

Parameters:

  | fi | file info set

Returns:
  current file linkto, NULL on invalid

Definition at line 251 of file rpmfi.c.

Referenced by rpmfi_FLink(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), and showQueryPackage().

uint16_t rpmfiFMode | ( | rpmfi | fi | ) |

Return current file mode from file info set.

Parameters:

  | fi | file info set

Returns:
  current file mode, 0 on invalid

Definition at line 199 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FMode(), rpmfi_iternext(), rpmfiBuildREContexts(), rpmfiCompare(), rpmfiDecideFate(), rpmVerifyFile(), showQueryPackage(), and skipFiles().

uint32_t rpmfiFMtime | ( | rpmfi | fi | ) |

Return current file modify time from file info set.

Parameters:

  | fi | file info set

Returns:
  current file modify time, 0 on invalid

Definition at line 382 of file rpmfi.c.

Referenced by rpmfi_FMtime(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiFN | ( | rpmfi | fi | ) |

Return current file name from file info set.

Parameters:

  | fi | file info set

Returns:
  current file name

Definition at line 133 of file rpmfi.c.

References stpcpy(), urlPath(), and xmalloc().

Referenced by handleOverlappedFiles(), rpmalAdd(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_FN(), rpmfi_iternext(), rpmfi_print(), rpmfi_subscript(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmfiDecideFate(), rpmtsCheck(), rpmtsRun(), rpmVerifyFile(), showQueryPackage(), and verifyHeader().

uint32_t rpmfiFNlink | ( | rpmfi | fi | ) |

Return (calculated) current file nlink count from file info set.

Parameters:

  | fi | file info set

Returns:
  current file nlink count, 0 on invalid

Definition at line 362 of file rpmfi.c.

Referenced by rpmfi_iternext(), and showQueryPackage().

uint16_t rpmfiFRdev | ( | rpmfi | fi | ) |

Return current file rdev from file info set.

Parameters:

  | fi | file info set

Returns:
  current file rdev, 0 on invalid

Definition at line 273 of file rpmfi.c.

Referenced by rpmfi_FRdev(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

rpmfi rpmfiFree | ( | rpmfi | fi | ) |

Destroy a file info set.

Parameters:

  | fi | file info set

Returns:
  NULL always

Definition at line 1156 of file rpmfi.c.

References _free(), _rpmfi_debug, freeFSM(), headerFree(), and rpmfiUnlink.

Referenced by delTE(), freePackage(), freeSpec(), genCpioListAndHeader(), handleInstInstalledFiles(), packageBinaries(), packageSources(), rpmalDel(), rpmalFree(), rpmfi_dealloc(), rpmfi_free(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmInstallSourcePackage(), rpmpsmFree(), rpmtsRun(), showQueryPackage(), and showVerifyPackage().

uint32_t rpmfiFSize | ( | rpmfi | fi | ) |

Return current file size from file info set.

Parameters:

  | fi | file info set

Returns:
  current file size, 0 on invalid

Definition at line 262 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfi_FSize(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

rpmfileState rpmfiFState | ( | rpmfi | fi | ) |

Return current file state from file info set.

Parameters:

  | fi | file info set

Returns:
  current file state, 0 on invalid

Definition at line 210 of file rpmfi.c.

References RPMFILE_STATE_MISSING.

Referenced by handleOverlappedFiles(), rpmfi_FState(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

const char* rpmfiFUser | ( | rpmfi | fi | ) |

Return current file owner from file info set.

Parameters:

  | fi | file info set

Returns:
  current file owner, NULL on invalid

Definition at line 393 of file rpmfi.c.

Referenced by rpmfi_FUser(), rpmfi_iternext(), rpmVerifyFile(), and showQueryPackage().

int rpmfiFX | ( | rpmfi | fi | ) |

Return current file index from file info set.

Parameters:

  | fi | file info set

Returns:
  current file index

Definition at line 73 of file rpmfi.c.

Referenced by rpmfi_FX().

rpmfi rpmfiInit | ( | rpmfi | fi,
|  | int | fx |
| ) |  |  |

Initialize file iterator index.

Parameters:

  | fi | file info set
  | fx | file iterator index

Returns:
  file info set

Definition at line 439 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmalAdd(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_iternext(), rpmfi_print(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmteColorDS(), rpmtsCheck(), rpmtsRun(), showQueryPackage(), skipFiles(), and verifyHeader().

rpmfi rpmfiInitD | ( | rpmfi | fi,
|  | int | dx |
| ) |  |  |

Initialize directory iterator index.

Parameters:

  | fi | file info set
  | dx | directory iterator index

Returns:
  file info set, NULL if dx is out of range

Definition at line 473 of file rpmfi.c.

Referenced by skipFiles().

int rpmfiIsSource | ( | rpmfi | fi | ) |

Return source rpm marker from file info set.

Parameters:

  | fi | file info set

Returns:
  source rpm?

Definition at line 106 of file rpmfi.c.

rpmfi rpmfiLink | ( | rpmfi | fi,
|  | const char * | msg |
| ) |  |  |

Reference a file info set instance.

Parameters:

  | fi | file info set
  | msg |

Returns:
  new file info set reference

rpmfi rpmfiNew | ( | const rpmts | ts,
|  | Header | h,
|  | rpmTag | tagN,
|  | int | flags |
| ) |  |  |

Create and load a file info set.

Parameters:

  | ts | transaction set (NULL skips path relocation)
  | h | header
  | tagN | RPMTAG_BASENAMES
  | flags | scareMem(0x1), nofilter(0x2)

Returns:
  new file info set

Definition at line 1260 of file rpmfi.c.

References _fdupedata, _fdupestring, _free(), _rpmfi_debug, alloca(), rpmDataType_u::argv, argvFree(), _HE_s::c, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, FA_UNKNOWN, headerFree(), headerGet(), headerIsEntry(), headerLink(), headerMacrosLoad(), headerMacrosUnload(), headerSprintf(), newFSM(), rpmRelocation_s::newPath, nibble(), _HE_s::p, PGPHASHALGO_CRC32, PGPHASHALGO_MD5, PGPHASHALGO_RIPEMD128, PGPHASHALGO_RIPEMD160, PGPHASHALGO_SHA1, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, rpmDataType_u::ptr, relocateFileList(), 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_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_ORIGBASENAMES, RPMTAG_POSTTRANS, RPMTAG_POSTTRANSPROG, RPMTAG_PRETRANS, RPMTAG_PRETRANSPROG, RPMTAG_REMOVETID, 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(), genCpioListAndHeader(), handleInstInstalledFiles(), hdr_fiFromHeader(), rpmfi_init(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmInstallSourcePackage(), rpmtsRun(), showQueryPackage(), and showVerifyPackage().

int rpmfiNext | ( | rpmfi | fi | ) |

Return next file iterator index.

Parameters:

  | fi | file info set

Returns:
  file iterator index, -1 on termination

Definition at line 417 of file rpmfi.c.

References _rpmfi_debug.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmalAdd(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_iternext(), rpmfi_print(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmteColorDS(), rpmtsCheck(), rpmtsRun(), showQueryPackage(), skipFiles(), and verifyHeader().

int rpmfiNextD | ( | rpmfi | fi | ) |

Return next directory iterator index.

Parameters:

  | fi | file info set

Returns:
  directory iterator index, -1 on termination

Definition at line 453 of file rpmfi.c.

References _rpmfi_debug.

Referenced by skipFiles().

int rpmfiSetDX | ( | rpmfi | fi,
|  | int | dx |
| ) |  |  |

Set current directory index in file info set.

Parameters:

  | fi | file info set
  | dx | new directory index

Returns:
  current directory index

Definition at line 95 of file rpmfi.c.

Referenced by rpmalAdd(), and rpmalDel().

uint32_t rpmfiSetFFlags | ( | rpmfi | fi,
|  | uint32_t | FFlags |
| ) |  |  |

Set current file flags in file info set.

Parameters:

  | fi | file info set
  | FFlags | new file flags

Returns:
  previous file flags, 0 on invalid

Definition at line 162 of file rpmfi.c.

Referenced by rpmtsRun().

rpmfileState rpmfiSetFState | ( | rpmfi | fi,
|  | rpmfileState | fstate |
| ) |  |  |

Set current file state in file info set.

Parameters:

  | fi | file info set
  | fstate | new file state

Returns:
  previous file state, 0 on invalid

Definition at line 221 of file rpmfi.c.

int rpmfiSetFX | ( | rpmfi | fi,
|  | int | fx |
| ) |  |  |

Set current file index in file info set.

Parameters:

  | fi | file info set
  | fx | new file index

Returns:
  current file index

Definition at line 78 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), and rpmfi_subscript().

uint32_t rpmfiSetVFlags | ( | rpmfi | fi,
|  | uint32_t | VFlags |
| ) |  |  |

Set current file verify flags in file info set.

Parameters:

  | fi | file info set
  | VFlags | new file verify flags

Returns:
  previous file verify flags, 0 on invalid

Definition at line 186 of file rpmfi.c.

const char* rpmfiTypeString | ( | rpmfi | fi | ) |

Return formatted string representation of package disposition.

Parameters:

  | fi | file info set

Returns:
  formatted string

Definition at line 658 of file rpmfi.c.

References rpmteType(), TR_ADDED, and TR_REMOVED.

Referenced by fsmStage().

rpmfi rpmfiUnlink | ( | rpmfi | fi,
|  | const char * | msg |
| ) |  |  |

Unreference a file info set instance.

Parameters:

  | fi | file info set
  | msg |

Returns:
  NULL always

uint32_t rpmfiVFlags | ( | rpmfi | fi | ) |

Return current file verify flags from file info set.

Parameters:

  | fi | file info set

Returns:
  current file verify flags, 0 on invalid

Definition at line 175 of file rpmfi.c.

Referenced by rpmfi_iternext(), rpmfi_VFlags(), and rpmVerifyFile().

rpmfi XrpmfiLink | ( | rpmfi | fi,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln |
| ) |  |  |

Todo:
  Remove debugging entry from the ABI.

Parameters:

  | fi | file info set
  | msg |
  | fn |
  | ln |

Returns:
  NULL always

Definition at line 46 of file rpmfi.c.

References _rpmfi_debug.

rpmfi XrpmfiUnlink | ( | rpmfi | fi,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln |
| ) |  |  |

Todo:
  Remove debugging entry from the ABI.

Parameters:

  | fi | file info set
  | msg |
  | fn |
  | ln |

Returns:
  NULL always

Definition at line 35 of file rpmfi.c.

References _rpmfi_debug.

## Variable Documentation

int _rpmfi_debug

Definition at line 33 of file rpmfi.c.