rpm  4.11.1-rc1
Data Structures | Macros | Typedefs | Enumerations | Functions
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...
 

Macros

#define RPMFILE_IS_INSTALLED(_x)   ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)
 
#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. More...
 
typedef enum rpmfileState_e rpmfileState
 File States (when installed). More...
 
typedef rpmFlags rpmfileAttrs
 
typedef enum rpmFileAction_e rpmFileAction
 File disposition(s) during package install/erase transaction. More...
 
typedef rpmFlags 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_MISSING = -1, 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_PUBKEY = (1 << 11)
}
 Exported File Attributes (ie RPMTAG_FILEFLAGS) 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)
}
 

Functions

rpmfi rpmfiLink (rpmfi fi)
 Reference a file info set instance. More...
 
rpm_count_t rpmfiFC (rpmfi fi)
 Return file count from file info set. More...
 
int rpmfiFX (rpmfi fi)
 Return current file index from file info set. More...
 
int rpmfiSetFX (rpmfi fi, int fx)
 Set current file index in file info set. More...
 
rpm_count_t rpmfiDC (rpmfi fi)
 Return directory count from file info set. More...
 
int rpmfiDX (rpmfi fi)
 Return current directory index from file info set. More...
 
int rpmfiSetDX (rpmfi fi, int dx)
 Set current directory index in file info set. More...
 
const char * rpmfiBN (rpmfi fi)
 Return current base name from file info set. More...
 
const char * rpmfiDN (rpmfi fi)
 Return current directory name from file info set. More...
 
const char * rpmfiFN (rpmfi fi)
 Return current file name from file info set. More...
 
rpmfileAttrs rpmfiFFlags (rpmfi fi)
 Return current file flags from file info set. More...
 
rpmVerifyAttrs rpmfiVFlags (rpmfi fi)
 Return current file verify flags from file info set. More...
 
rpm_mode_t rpmfiFMode (rpmfi fi)
 Return current file mode from file info set. More...
 
rpmfileState rpmfiFState (rpmfi fi)
 Return current file state from file info set. More...
 
int rpmfiDigestAlgo (rpmfi fi)
 Return digest algorithm of a file info set. More...
 
const unsigned char * rpmfiFDigest (rpmfi fi, int *algo, size_t *diglen)
 Return current file (binary) digest of file info set. More...
 
char * rpmfiFDigestHex (rpmfi fi, int *algo)
 Return current file (hex) digest of file info set. More...
 
const unsigned char * rpmfiMD5 (rpmfi fi) RPM_GNUC_DEPRECATED
 Return current file (binary) md5 digest from file info set. More...
 
const char * rpmfiFLink (rpmfi fi)
 Return current file linkto (i.e. More...
 
rpm_loff_t rpmfiFSize (rpmfi fi)
 Return current file size from file info set. More...
 
rpm_rdev_t rpmfiFRdev (rpmfi fi)
 Return current file rdev from file info set. More...
 
rpm_ino_t rpmfiFInode (rpmfi fi)
 Return current file inode from file info set. More...
 
rpm_color_t rpmfiColor (rpmfi fi)
 Return union of all file color bits from file info set. More...
 
rpm_color_t rpmfiFColor (rpmfi fi)
 Return current file color bits from file info set. More...
 
const char * rpmfiFClass (rpmfi fi)
 Return current file class from file info set. More...
 
uint32_t rpmfiFDepends (rpmfi fi, const uint32_t **fddictp)
 Return current file depends dictionary from file info set. More...
 
uint32_t rpmfiFNlink (rpmfi fi)
 Return (calculated) current file nlink count from file info set. More...
 
rpm_time_t rpmfiFMtime (rpmfi fi)
 Return current file modify time from file info set. More...
 
const char * rpmfiFUser (rpmfi fi)
 Return current file owner from file info set. More...
 
const char * rpmfiFGroup (rpmfi fi)
 Return current file group from file info set. More...
 
const char * rpmfiFCaps (rpmfi fi)
 Return textual representation of current file capabilities from file info set. More...
 
const char * rpmfiFLangs (rpmfi fi)
 Return current file language(s) from file info set. More...
 
int rpmfiNext (rpmfi fi)
 Return next file iterator index. More...
 
rpmfi rpmfiInit (rpmfi fi, int fx)
 Initialize file iterator index. More...
 
int rpmfiNextD (rpmfi fi)
 Return next directory iterator index. More...
 
rpmfi rpmfiInitD (rpmfi fi, int dx)
 Initialize directory iterator index. More...
 
rpmfi rpmfiFree (rpmfi fi)
 Destroy a file info set. More...
 
rpmfi rpmfiNewPool (rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags)
 Create and load a file info set. More...
 
rpmfi rpmfiNew (const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags)
 Create and load a file info set. More...
 
rpmFileTypes rpmfiWhatis (rpm_mode_t mode)
 Return file type from mode_t. More...
 
int rpmfiCompare (const rpmfi afi, const rpmfi bfi)
 Return file info comparison. More...
 
rpmFileAction rpmfiDecideFate (const rpmfi ofi, rpmfi nfi, int skipMissing)
 Return file disposition. More...
 
int rpmfiConfigConflict (const rpmfi fi)
 Return whether file is conflicting config. More...
 

Detailed Description

Structure(s) used for file info tag sets.

Definition in file rpmfi.h.

Macro Definition Documentation

#define RPMFI_FLAGS_ERASE
Value:
RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \
RPMFI_NOFILEVERIFYFLAGS)

Definition at line 397 of file rpmfi.h.

#define RPMFI_FLAGS_INSTALL   (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)

Definition at line 402 of file rpmfi.h.

#define RPMFI_FLAGS_QUERY
Value:

Definition at line 409 of file rpmfi.h.

#define RPMFI_FLAGS_VERIFY
Value:

Definition at line 405 of file rpmfi.h.

#define RPMFILE_ALL   ~(RPMFILE_NONE)

Definition at line 68 of file rpmfi.h.

#define RPMFILE_IS_INSTALLED (   _x)    ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)

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

Definition at line 395 of file rpmfi.h.

Definition at line 66 of file rpmfi.h.

File States (when installed).

Enumeration Type Documentation

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 

Definition at line 373 of file rpmfi.h.

Exported File Attributes (ie RPMTAG_FILEFLAGS)

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_PUBKEY 

from %pubkey

Definition at line 51 of file rpmfi.h.

File States (when installed).

Enumerator
RPMFILE_STATE_MISSING 
RPMFILE_STATE_NORMAL 
RPMFILE_STATE_REPLACED 
RPMFILE_STATE_NOTINSTALLED 
RPMFILE_STATE_NETSHARED 
RPMFILE_STATE_WRONGCOLOR 

Definition at line 37 of file rpmfi.h.