12 #include <rpm/rpmtypes.h> 13 #include <rpm/rpmvf.h> 14 #include <rpm/rpmpgp.h> 45 #define RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED) 67 #define RPMFILE_ALL ~(RPMFILE_NONE) 89 #define XFA_SKIPPING(_a) \ 90 ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR) 125 #define RPMFI_FLAGS_ERASE \ 126 (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \ 127 RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \ 128 RPMFI_NOFILEVERIFYFLAGS) 130 #define RPMFI_FLAGS_INSTALL \ 131 (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS) 133 #define RPMFI_FLAGS_VERIFY \ 134 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \ 137 #define RPMFI_FLAGS_QUERY \ 138 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \ 139 RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS) 141 #define RPMFI_FLAGS_ONLY_FILENAMES \ 142 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \ 143 RPMFI_NOFILEUSER | RPMFI_NOFILEGROUP | RPMFI_NOFILEMODES | \ 144 RPMFI_NOFILESIZES | RPMFI_NOFILECAPS | RPMFI_NOFILELINKTOS | \ 145 RPMFI_NOFILEDIGESTS | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \ 146 RPMFI_NOFILEINODES | RPMFI_NOFILESTATES | RPMFI_NOFILECOLORS | \ 147 RPMFI_NOFILEVERIFYFLAGS | RPMFI_NOFILEFLAGS) 159 #define RPMFILEITERMAX 6
rpm_color_t rpmfilesFColor(rpmfiles fi, int ix)
Return file color bits from file info set.
const char * rpmfilesFGroup(rpmfiles fi, int ix)
Return file group from file info set.
rpm_count_t rpmfilesDC(rpmfiles fi)
Return directory count from file info set.
const char * rpmfilesODN(rpmfiles fi, int jx)
Return original directory name from file info set.
rpm_time_t rpmfilesFMtime(rpmfiles fi, int ix)
Return file modify time from file info set.
rpm_ino_t rpmfilesFInode(rpmfiles fi, int ix)
Return file inode from file info set.
const char * rpmfilesFCaps(rpmfiles fi, int ix)
Return textual representation of file capabilities from file info set.
rpm_rdev_t rpmfilesFRdev(rpmfiles fi, int ix)
Return file rdev from file info set.
rpmfi rpmfilesIter(rpmfiles files, int itype)
enum rpmFileAction_e rpmFileAction
File disposition(s) during package install/erase transaction.
enum rpmFileTypes_e rpmFileTypes
File types.
enum rpmFileIter_e rpmFileIter
rpmFileTypes_e
File types.
const char * rpmfilesFLink(rpmfiles fi, int ix)
Return file linkto (i.e.
We pass these around as an array with a sentinel.
rpmfileState rpmfilesFState(rpmfiles fi, int ix)
Return file state from file info set.
int rpmfilesODI(rpmfiles fi, int ix)
Return original directory index from file info set.
int rpmfilesDI(rpmfiles fi, int ix)
Return directory index from file info set.
struct rpmstrPool_s * rpmstrPool
rpm_mode_t rpmfilesFMode(rpmfiles fi, int ix)
Return file mode from file info set.
uint32_t rpmfilesFLinks(rpmfiles fi, int ix, const int **files)
Return (calculated) file nlink count from file info set.
int rpmfilesStat(rpmfiles fi, int ix, int flags, struct stat *sb)
Map file stat(2) info.
struct headerToken_s * Header
RPM header and data retrieval types.
enum rpmfileState_e rpmfileState
File States (when installed).
int rpmfilesDigestAlgo(rpmfiles fi)
Return digest algorithm of a file info set.
rpmfileAttrs_e
Exported File Attributes (ie RPMTAG_FILEFLAGS)
int rpmfilesFindFN(rpmfiles files, const char *fn)
Return file index of the given file name or -1 if file is not in the rpmfi.
const char * rpmfilesDN(rpmfiles fi, int jx)
Return directory name from file info set.
const unsigned char * rpmfilesFSignature(rpmfiles fi, int ix, size_t *len)
Return file (binary) digest of file info set.
rpmfiles rpmfilesFree(rpmfiles fi)
Destroy a file info set.
const char * rpmfilesFUser(rpmfiles fi, int ix)
Return file owner from file info set.
char * rpmfilesFN(rpmfiles fi, int ix)
Return file name from file info set.
const char * rpmfilesBN(rpmfiles fi, int ix)
Return base name from file info set.
rpmFileAction_e
File disposition(s) during package install/erase transaction.
rpmfileState_e
File States (when installed).
const char * rpmfilesFLangs(rpmfiles fi, int ix)
Return file language(s) from file info set.
rpmfileAttrs rpmfilesFFlags(rpmfiles fi, int ix)
Return file flags from file info set.
rpmVerifyAttrs rpmfilesVFlags(rpmfiles fi, int ix)
Return file verify flags from file info set.
uint32_t rpmfilesFNlink(rpmfiles fi, int ix)
Return (calculated) file nlink count from file info set.
const char * rpmfilesOBN(rpmfiles fi, int ix)
Return original base name from file info set.
int rpmfilesFindOFN(rpmfiles files, const char *fn)
Return file index of the given original file name or -1 if file is not in the rpmfi.
rpmfiles rpmfilesNew(rpmstrPool pool, Header h, rpmTagVal tagN, rpmfiFlags flags)
Create and load a file info set.
rpmVerifyAttrs rpmfilesVerify(rpmfiles fi, int ix, rpmVerifyAttrs omitMask)
Verify file attributes (including digest).
rpm_color_t rpmfilesColor(rpmfiles files)
Return union of all file color bits from file info set.
rpm_count_t rpmfilesFC(rpmfiles fi)
Return file count from file info set.
uint32_t rpmfilesFDepends(rpmfiles fi, int ix, const uint32_t **fddictp)
Return file depends dictionary from file info set.
char * rpmfilesOFN(rpmfiles fi, int ix)
Return original file name from file info set.
const unsigned char * rpmfilesFDigest(rpmfiles fi, int ix, int *algo, size_t *len)
Return file (binary) digest of file info set.
struct rpmfiles_s * rpmfiles
rpm_loff_t rpmfilesFSize(rpmfiles fi, int ix)
Return file size from file info set.
rpmfiles rpmfilesLink(rpmfiles fi)
Reference a file info set instance.
int rpmfilesCompare(rpmfiles afi, int aix, rpmfiles bfi, int bix)
Return file info comparison.
const char * rpmfilesFClass(rpmfiles fi, int ix)
Return file class from file info set.