# rpmfi.h File Reference

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

`#include <rpm/rpmtypes.h>`
`#include <rpm/rpmvf.h>`
`#include <rpm/rpmpgp.h>`
Include dependency graph for rpmfi.h:

Go to the source code of this file.

## Data Structures
struct | rpmRelocation_s
| We pass these around as an array with a sentinel. More...
## Defines
#define | RPMFILE_STATE_MISSING -1
#define | RPMFILE_ALL ~(RPMFILE_NONE)
#define | XFA_SKIPPING(_a) ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
#define | RPMFI_FLAGS_ERASE
#define | RPMFI_FLAGS_INSTALL (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)
#define | RPMFI_FLAGS_VERIFY
#define | RPMFI_FLAGS_QUERY
## 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 rpmFileAction_e | rpmFileAction
| File disposition(s) during package install/erase transaction.
typedef enum rpmfiFlags_e | rpmfiFlags
## 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) }
| File Attributes. More...
enum | rpmFileAction_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...
enum | rpmfiFlags_e { RPMFI_NOHEADER = 0, RPMFI_KEEPHEADER = (1 << 0), RPMFI_NOFILECLASS = (1 << 1), RPMFI_NOFILEDEPS = (1 << 2), RPMFI_NOFILELANGS = (1 << 3), RPMFI_NOFILEUSER = (1 << 4), RPMFI_NOFILEGROUP = (1 << 5), RPMFI_NOFILEMODES = (1 << 6), RPMFI_NOFILESIZES = (1 << 7), RPMFI_NOFILECAPS = (1 << 8), RPMFI_NOFILELINKTOS = (1 << 9), RPMFI_NOFILEDIGESTS = (1 << 10), RPMFI_NOFILEMTIMES = (1 << 11), RPMFI_NOFILERDEVS = (1 << 12), RPMFI_NOFILEINODES = (1 << 13), RPMFI_NOFILESTATES = (1 << 14), RPMFI_NOFILECOLORS = (1 << 15), RPMFI_NOFILEVERIFYFLAGS = (1 << 16), RPMFI_NOFILEFLAGS = (1 << 17), RPMFI_ISBUILD = (1 << 30), RPMFI_ISSOURCE = (1 << 31) }
## Functions
rpmfi | rpmfiUnlink (rpmfi fi, const char *msg)
| Unreference a file info set instance.
rpmfi | rpmfiLink (rpmfi fi, const char *msg)
| Reference a file info set instance.
rpm_count_t | 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.
rpm_count_t | 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.
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.
rpmfileAttrs | rpmfiFFlags (rpmfi fi)
| Return current file flags from file info set.
rpmVerifyAttrs | rpmfiVFlags (rpmfi fi)
| Return current file verify flags from file info set.
rpm_mode_t | rpmfiFMode (rpmfi fi)
| Return current file mode from file info set.
rpmfileState | rpmfiFState (rpmfi fi)
| Return current file state from file info set.
pgpHashAlgo | rpmfiDigestAlgo (rpmfi fi)
| Return digest algorithm of a file info set.
const unsigned char * | rpmfiFDigest (rpmfi fi, pgpHashAlgo *algo, size_t *diglen)
| Return current file (binary) digest of file info set.
char * | rpmfiFDigestHex (rpmfi fi, pgpHashAlgo *algo)
| Return current file (hex) digest of file info set.
const unsigned char * | rpmfiMD5 (rpmfi fi)
| Return current file (binary) md5 digest from file info set.
const char * | rpmfiFLink (rpmfi fi)
| Return current file linkto (i.e.
rpm_loff_t | rpmfiFSize (rpmfi fi)
| Return current file size from file info set.
rpm_rdev_t | rpmfiFRdev (rpmfi fi)
| Return current file rdev from file info set.
rpm_ino_t | rpmfiFInode (rpmfi fi)
| Return current file inode from file info set.
rpm_color_t | rpmfiColor (rpmfi fi)
| Return union of all file color bits from file info set.
rpm_color_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.
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.
rpm_time_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.
const char * | rpmfiFCaps (rpmfi fi)
| Return textual representation of current file capabilities from file info set.
const char * | rpmfiFLangs (rpmfi fi)
| Return current file language(s) 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, rpmfiFlags flags)
| Create and load a file info set.
rpmFileTypes | rpmfiWhatis (rpm_mode_t mode)
| Return file type from mode_t.
int | rpmfiCompare (const rpmfi afi, const rpmfi bfi)
| Return file info comparison.
rpmFileAction | rpmfiDecideFate (const rpmfi ofi, rpmfi nfi, int skipMissing)
| Return file disposition.
int | rpmfiConfigConflict (const rpmfi fi)
| Return whether file is conflicting config.
## Variables
int | _rpmfi_debug

## Detailed Description

Structure(s) used for file info tag sets.

Definition in file rpmfi.h.

## Define Documentation

#define RPMFI_FLAGS_ERASE

Value:

    (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
         RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \
         RPMFI_NOFILEVERIFYFLAGS)

Definition at line 407 of file rpmfi.h.

#define RPMFI_FLAGS_INSTALL (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)

Definition at line 412 of file rpmfi.h.

#define RPMFI_FLAGS_QUERY

Value:

    (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
         RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS)

Definition at line 419 of file rpmfi.h.

#define RPMFI_FLAGS_VERIFY

Value:

    (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
         RPMFI_NOFILECOLORS)

Definition at line 415 of file rpmfi.h.

#define RPMFILE_ALL ~(RPMFILE_NONE)

Definition at line 68 of file rpmfi.h.

#define RPMFILE_STATE_MISSING -1

Definition at line 46 of file rpmfi.h.

#define XFA_SKIPPING | ( | _a |  | ) | ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)

Definition at line 88 of file rpmfi.h.

## Typedef Documentation

typedef enum rpmfiFlags_e rpmfiFlags

typedef enum rpmfileAttrs_e rpmfileAttrs

File Attributes.

typedef enum rpmfileState_e rpmfileState

File States (when installed).

## Enumeration Type Documentation

enum rpmfiFlags_e

Enumerator:

  RPMFI_NOHEADER |
  RPMFI_KEEPHEADER |
  RPMFI_NOFILECLASS |
  RPMFI_NOFILEDEPS |
  RPMFI_NOFILELANGS |
  RPMFI_NOFILEUSER |
  RPMFI_NOFILEGROUP |
  RPMFI_NOFILEMODES |
  RPMFI_NOFILESIZES |
  RPMFI_NOFILECAPS |
  RPMFI_NOFILELINKTOS |
  RPMFI_NOFILEDIGESTS |
  RPMFI_NOFILEMTIMES |
  RPMFI_NOFILERDEVS |
  RPMFI_NOFILEINODES |
  RPMFI_NOFILESTATES |
  RPMFI_NOFILECOLORS |
  RPMFI_NOFILEVERIFYFLAGS |
  RPMFI_NOFILEFLAGS |
  RPMFI_ISBUILD |
  RPMFI_ISSOURCE |

Definition at line 383 of file rpmfi.h.

enum rpmfileAttrs_e

File Attributes.

Enumerator:

  RPMFILE_NONE |
  RPMFILE_CONFIG | from %config
  RPMFILE_DOC | from %doc
  RPMFILE_ICON | from %donotuse.
  RPMFILE_MISSINGOK | from %config(missingok)
  RPMFILE_NOREPLACE | from %config(noreplace)
  RPMFILE_SPECFILE | Todo: (unnecessary) marks 1st file in srpm.
  RPMFILE_GHOST | from %ghost
  RPMFILE_LICENSE | from %license
  RPMFILE_README | from %readme
  RPMFILE_EXCLUDE | from %exclude, internal
  RPMFILE_UNPATCHED | placeholder (SuSE)
  RPMFILE_PUBKEY | from %pubkey
  RPMFILE_POLICY | from %policy

Definition at line 51 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 39 of file rpmfi.h.

## Variable Documentation

int _rpmfi_debug