lib/rpmfi.c File Reference

Routines to handle file info tag sets. More...

#include "system.h"
#include <rpmio_internal.h>
#include <rpmlib.h>
#include "cpio.h"
#include "fsm.h"
#include "rpmds.h"
#include "rpmfi.h"
#include <selinux/selinux.h>
#include "rpmte.h"
#include "rpmts.h"
#include "legacy.h"
#include "misc.h"
#include "rpmmacro.h"
#include "debug.h"

Go to the source code of this file.

Defines

#define _RPMFI_INTERNAL
#define _RPMTE_INTERNAL
#define alloca_strdup(_s)   strcpy(alloca(strlen(_s)+1), (_s))
#define _fdupe(_fi, _data)
#define _fdupestring(_h, _tag, _data)

Functions

rpmfi XrpmfiUnlink (rpmfi fi, const char *msg, const char *fn, unsigned ln)
rpmfi XrpmfiLink (rpmfi fi, const char *msg, const char *fn, unsigned ln)
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.
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.
int_32 rpmfiFFlags (rpmfi fi)
 Return current file flags from file info set.
int_32 rpmfiVFlags (rpmfi fi)
 Return current file verify flags from file info set.
int_16 rpmfiFMode (rpmfi fi)
 Return current file mode from file info set.
rpmfileState rpmfiFState (rpmfi fi)
 Return current file state from 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.
int_32 rpmfiFSize (rpmfi fi)
 Return current file size from file info set.
int_16 rpmfiFRdev (rpmfi fi)
 Return current file rdev from file info set.
int_32 rpmfiFInode (rpmfi fi)
 Return current file inode from file info set.
uint_32 rpmfiColor (rpmfi fi)
 Return union of all file color bits from file info set.
uint_32 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.
int_32 rpmfiFDepends (rpmfi fi, const int_32 **fddictp)
 Return current file depends dictionary from file info set.
int_32 rpmfiFNlink (rpmfi fi)
 Return (calculated) current file nlink count from file info set.
int_32 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.
static const char *const ftstring (fileTypes ft)
 Identify a file type.
fileTypes whatis (uint_16 mode)
 Return file type from mode_t.
int rpmfiCompare (const rpmfi afi, const rpmfi bfi)
 Return file info comparison.
fileAction rpmfiDecideFate (const rpmfi ofi, rpmfi nfi, int skipMissing)
 Return file disposition.
int rpmfiConfigConflict (const rpmfi fi)
 Return whether file is conflicting config.
const char *const rpmfiTypeString (rpmfi fi)
 Return formatted string representation of package disposition.
static Header relocateFileList (const rpmts ts, rpmfi fi, Header origH, fileAction *actions)
 Relocate files in header.
rpmfi rpmfiFree (rpmfi fi)
 Destroy a file info set.
static unsigned char nibble (char c)
 Convert hex to binary nibble.
rpmfi rpmfiNew (const rpmts ts, Header h, rpmTag tagN, int scareMem)
 Create and load a file info set.
void rpmfiBuildFClasses (Header h, const char ***fclassp, int *fcp)
 Retrieve file classes from header.
void rpmfiBuildFContexts (Header h, const char ***fcontextp, int *fcp)
 Retrieve file security contexts from header.
void rpmfiBuildFSContexts (Header h, const char ***fcontextp, int *fcp)
 Retrieve file security contexts from file system.
void rpmfiBuildREContexts (Header h, const char ***fcontextp, int *fcp)
 Retrieve file security contexts from policy RE's.
void rpmfiBuildFDeps (Header h, rpmTag tagN, const char ***fdepsp, int *fcp)
 Retrieve per-file dependencies from header.

Variables

int _rpmfi_debug = 0


Detailed Description

Routines to handle file info tag sets.

Definition in file rpmfi.c.


Define Documentation

#define _fdupe ( _fi,
_data   ) 

Value:

if ((_fi)->_data != NULL)       \
        (_fi)->_data = memcpy(xmalloc((_fi)->fc * sizeof(*(_fi)->_data)), \
                        (_fi)->_data, (_fi)->fc * sizeof(*(_fi)->_data))

Definition at line 1253 of file rpmfi.c.

Referenced by rpmfiNew().

#define _fdupestring ( _h,
_tag,
_data   ) 

Value:

if (hge((_h), (_tag), NULL, (void **) &(_data), NULL)) \
        _data = xstrdup(_data)

Definition at line 1259 of file rpmfi.c.

Referenced by rpmfiNew().

#define _RPMFI_INTERNAL

Definition at line 16 of file rpmfi.c.

#define _RPMTE_INTERNAL

Definition at line 21 of file rpmfi.c.

#define alloca_strdup ( _s   )     strcpy(alloca(strlen(_s)+1), (_s))

Definition at line 695 of file rpmfi.c.


Function Documentation

static const char* const ftstring ( fileTypes  ft  )  [static]

Identify a file type.

Parameters:
ft file type
Returns:
string to identify a file type

Definition at line 488 of file rpmfi.c.

References BDEV, CDEV, LINK, PIPE, REG, SOCK, and XDIR.

static unsigned char nibble ( char  c  )  [inline, static]

Convert hex to binary nibble.

Parameters:
c hex character
Returns:
binary nibble

Definition at line 1241 of file rpmfi.c.

static Header relocateFileList ( const rpmts  ts,
rpmfi  fi,
Header  origH,
fileAction actions 
) [static]

Relocate files in header.

Todo:
multilib file dispositions need to be checked.
Parameters:
ts transaction set
fi transaction element file info
origH package header
actions file dispositions
Returns:
header with relocated files

Definition at line 708 of file rpmfi.c.

References alloca(), alloca_strdup, headerFreeData(), headerIsEntry(), headerLink(), rpmExpandNumeric(), RPMPROB_BADRELOCATE, RPMPROB_FILTER_FORCERELOCATE, rpmpsAppend(), rpmpsFree(), RPMTAG_INSTPREFIXES, RPMTAG_PREFIXES, rpmteKey(), rpmteNEVR(), rpmtsFilterFlags(), rpmtsProblems(), rpmtsRelocateElement(), and stripTrailingChar().

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 109 of file rpmfi.c.

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

void rpmfiBuildFClasses ( Header  h,
const char ***  fclassp,
int *  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 1514 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,
int *  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 1569 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,
int *  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 1771 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,
int *  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 1624 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,
int *  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 1695 of file rpmfi.c.

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

Referenced by recontextsTag().

uint_32 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 272 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 518 of file rpmfi.c.

References LINK, REG, rpmfiFLink(), rpmfiFMode(), rpmfiMD5(), and whatis().

Referenced by handleInstInstalledFiles(), and handleOverlappedFiles().

int rpmfiConfigConflict ( const rpmfi  fi  ) 

Return whether file is conflicting config.

Parameters:
fi file info
Returns:
1 if config file and file on disk conflicts

Definition at line 642 of file rpmfi.c.

References domd5(), LINK, REG, rpmfiFFlags(), rpmfiFLink(), rpmfiFMode(), rpmfiFN(), RPMFILE_CONFIG, rpmfiMD5(), and whatis().

Referenced by handleOverlappedFiles().

int rpmfiDC ( rpmfi  fi  ) 

Return directory count from file info set.

Parameters:
fi file info set
Returns:
current directory count

Definition at line 63 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 547 of file rpmfi.c.

References _, domd5(), FA_ALTNAME, FA_CREATE, FA_SAVE, FA_SKIP, LINK, REG, rpmfiFFlags(), rpmfiFLink(), rpmfiFMode(), rpmfiFN(), RPMFILE_MISSINGOK, RPMFILE_NOREPLACE, rpmfiMD5(), RPMMESS_DEBUG, rpmMessage, save, whatis(), and XDIR.

Referenced by handleInstInstalledFiles().

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 93 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 58 of file rpmfi.c.

Referenced by handleOverlappedFiles(), markReplacedFiles(), 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 296 of file rpmfi.c.

Referenced by rpmfi_FClass(), and rpmfiBuildFClasses().

uint_32 rpmfiFColor ( rpmfi  fi  ) 

Return current file color bits from file info set.

Parameters:
fi file info set
Returns:
current file color

Definition at line 282 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 311 of file rpmfi.c.

Referenced by rpmfiBuildFContexts().

int_32 rpmfiFDepends ( rpmfi  fi,
const int_32 **  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 324 of file rpmfi.c.

Referenced by rpmfiBuildFDeps(), and rpmteColorDS().

int_32 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 155 of file rpmfi.c.

Referenced by handleInstInstalledFiles(), handleOverlappedFiles(), rpmfcGenerateDepends(), rpmfi_FFlags(), rpmfi_iternext(), rpmfiConfigConflict(), rpmfiDecideFate(), 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 396 of file rpmfi.c.

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

int_32 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 259 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 220 of file rpmfi.c.

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

int_16 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 181 of file rpmfi.c.

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

int_32 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 369 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 135 of file rpmfi.c.

References stpcpy(), and xmalloc().

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

int_32 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 347 of file rpmfi.c.

Referenced by rpmfi_iternext(), and showQueryPackage().

int_16 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 246 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 1151 of file rpmfi.c.

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

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

int_32 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 233 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 194 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 382 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 74 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 434 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 468 of file rpmfi.c.

Referenced by skipFiles().

const unsigned char* rpmfiMD5 ( rpmfi  fi  ) 

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

Parameters:
fi file info set
Returns:
current file md5 digest, NULL on invalid

Definition at line 207 of file rpmfi.c.

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

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

Create and load a file info set.

Deprecated:
Only scareMem = 0 will be permitted.
Parameters:
ts transaction set (NULL skips path relocation)
h header
tagN RPMTAG_BASENAMES
scareMem Use pointers to refcounted header memory?
Returns:
new file info set

Definition at line 1263 of file rpmfi.c.

References _fdupe, _fdupestring, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, FA_UNKNOWN, headerAddEntry(), headerFreeData(), headerGetEntry(), headerGetEntryMinMemory(), headerLink(), headerModifyEntry(), headerRemoveEntry(), newFSM(), nibble(), RPMTAG_ARCHIVESIZE, RPMTAG_BASENAMES, RPMTAG_CLASSDICT, RPMTAG_DEPENDSDICT, RPMTAG_DIRINDEXES, RPMTAG_DIRNAMES, RPMTAG_FILECLASS, RPMTAG_FILECOLORS, RPMTAG_FILEDEPENDSN, RPMTAG_FILEDEPENDSX, RPMTAG_FILEFLAGS, RPMTAG_FILELANGS, RPMTAG_FILELINKTOS, RPMTAG_FILEMD5S, RPMTAG_FILEMODES, RPMTAG_FILESIZES, RPMTAG_FILESTATES, RPMTAG_FILEVERIFYFLAGS, RPMTAG_POSTTRANS, RPMTAG_POSTTRANSPROG, RPMTAG_PRETRANS, RPMTAG_PRETRANSPROG, xcalloc(), and xmalloc().

Referenced by addTE(), genCpioListAndHeader(), handleInstInstalledFiles(), hdr_fiFromHeader(), rpmfi_init(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmInstallSourcePackage(), rpmtsAddAvailableElement(), 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 410 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 448 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 98 of file rpmfi.c.

Referenced by rpmalAdd(), and rpmalDel().

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 79 of file rpmfi.c.

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

const char* const rpmfiTypeString ( rpmfi  fi  ) 

Return formatted string representation of package disposition.

Parameters:
fi file info set
Returns:
formatted string

Definition at line 685 of file rpmfi.c.

References rpmteType(), TR_ADDED, and TR_REMOVED.

Referenced by fsmStage().

int_32 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 168 of file rpmfi.c.

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

fileTypes whatis ( uint_16  mode  ) 

Return file type from mode_t.

Parameters:
mode file mode bits (from header)
Returns:
file type

Definition at line 504 of file rpmfi.c.

References BDEV, CDEV, LINK, PIPE, REG, S_ISLNK, S_ISSOCK, SOCK, and XDIR.

Referenced by rpmfiCompare(), rpmfiConfigConflict(), rpmfiDecideFate(), and skipFiles().

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 47 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 36 of file rpmfi.c.

References _rpmfi_debug.


Variable Documentation

int _rpmfi_debug = 0

Definition at line 34 of file rpmfi.c.


Generated on Fri Oct 12 08:44:55 2007 for rpm by  doxygen 1.5.2