Go to the documentation of this file.
12 #include <rpm/rpmtypes.h>
13 #include <rpm/rpmpgp.h>
44 #define RPMFILE_IS_INSTALLED(_x) ((_x) == RPMFILE_STATE_NORMAL || (_x) == RPMFILE_STATE_NETSHARED)
67 #define RPMFILE_ALL ~(RPMFILE_NONE)
97 #define RPMVERIFY_ALL ~(RPMVERIFY_NONE)
98 #define RPMVERIFY_FAILURES \
99 (RPMVERIFY_LSTATFAIL|RPMVERIFY_READFAIL|RPMVERIFY_READLINKFAIL|RPMVERIFY_LGETFILECONFAIL)
121 #define XFA_SKIPPING(_a) \
122 ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
157 #define RPMFI_FLAGS_ERASE \
158 (RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
159 RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
160 RPMFI_NOFILEVERIFYFLAGS)
162 #define RPMFI_FLAGS_INSTALL \
163 (RPMFI_NOFILECLASS | RPMFI_NOFILEVERIFYFLAGS)
165 #define RPMFI_FLAGS_VERIFY \
166 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
169 #define RPMFI_FLAGS_QUERY \
170 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
171 RPMFI_NOFILECOLORS | RPMFI_NOFILEVERIFYFLAGS)
173 #define RPMFI_FLAGS_FILETRIGGER \
174 (RPMFI_NOFILECLASS | RPMFI_NOFILEDEPS | RPMFI_NOFILELANGS | \
175 RPMFI_NOFILEUSER | RPMFI_NOFILEGROUP | RPMFI_NOFILEMODES | \
176 RPMFI_NOFILESIZES | RPMFI_NOFILECAPS | RPMFI_NOFILELINKTOS | \
177 RPMFI_NOFILEDIGESTS | RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
178 RPMFI_NOFILEINODES | RPMFI_NOFILECOLORS | \
179 RPMFI_NOFILEVERIFYFLAGS | RPMFI_NOFILEFLAGS)
181 #define RPMFI_FLAGS_ONLY_FILENAMES \
182 (RPMFI_FLAGS_FILETRIGGER | RPMFI_NOFILESTATES)
194 #define RPMFILEITERMAX 6
const char * rpmfilesODN(rpmfiles fi, int jx)
Return original directory name 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.
int rpmfilesStat(rpmfiles fi, int ix, int flags, struct stat *sb)
Map file stat(2) info.
rpm_time_t rpmfilesFMtime(rpmfiles fi, int ix)
Return file modify time from file info set.
rpmfi rpmfilesIter(rpmfiles files, int itype)
rpm_rdev_t rpmfilesFRdev(rpmfiles fi, int ix)
Return file rdev from file info set.
@ RPMFILE_STATE_NETSHARED
const char * rpmfilesFCaps(rpmfiles fi, int ix)
Return textual representation of file capabilities from file info set.
@ RPMFILE_STATE_WRONGCOLOR
enum rpmFileTypes_e rpmFileTypes
File types.
rpm_ino_t rpmfilesFInode(rpmfiles fi, int ix)
Return file inode from file info set.
struct rpmfiles_s * rpmfiles
struct rpmstrPool_s * rpmstrPool
@ RPMVERIFY_LGETFILECONFAIL
const char * rpmfilesFLink(rpmfiles fi, int ix)
Return file linkto (i.e.
rpmfileState rpmfilesFState(rpmfiles fi, int ix)
Return file state from file info set.
int rpmfilesDI(rpmfiles fi, int ix)
Return directory index from file info set.
rpmFileTypes_e
File types.
@ RPMFILE_STATE_NOTINSTALLED
enum rpmfileState_e rpmfileState
File States (when installed).
@ RPMFI_ITER_READ_ARCHIVE
@ RPMFI_NOFILEVERIFYFLAGS
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 rpmfilesODI(rpmfiles fi, int ix)
Return original directory index from file info set.
int rpmfilesDigestAlgo(rpmfiles fi)
Return digest algorithm of a file info set.
enum rpmFileAction_e rpmFileAction
File disposition(s) during package install/erase transaction.
const char * rpmfilesDN(rpmfiles fi, int jx)
Return directory name from file info set.
rpmfiles rpmfilesFree(rpmfiles fi)
Destroy a file info set.
const unsigned char * rpmfilesFSignature(rpmfiles fi, int ix, size_t *len)
Return file (binary) digest of file info set.
const char * rpmfilesFUser(rpmfiles fi, int ix)
Return file owner from file info set.
enum rpmFileIter_e rpmFileIter
char * rpmfilesFN(rpmfiles fi, int ix)
Return file name from file info set.
@ RPMFI_ITER_READ_ARCHIVE_CONTENT_FIRST
We pass these around as an array with a sentinel.
rpmVerifyAttrs_e
Exported file verify attributes (ie RPMTAG_FILEVERIFYFLAGS) + bits used for reporting failures.
rpmVerifyAttrs rpmfilesVFlags(rpmfiles fi, int ix)
Return file verify flags from file info set.
const char * rpmfilesFLangs(rpmfiles fi, int ix)
Return file language(s) from file info set.
int rpmfilesFindFN(rpmfiles files, const char *fn)
Return file index of the given 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).
@ RPMFI_ITER_WRITE_ARCHIVE
rpmFileAction_e
File disposition(s) during package install/erase transaction.
const char * rpmfilesBN(rpmfiles fi, int ix)
Return base name from file info set.
rpmfileAttrs rpmfilesFFlags(rpmfiles fi, int ix)
Return file flags from file info set.
const char * rpmfilesOBN(rpmfiles fi, int ix)
Return original base name from file info set.
rpm_color_t rpmfilesColor(rpmfiles files)
Return union of all file color bits from file info set.
uint32_t rpmfilesFNlink(rpmfiles fi, int ix)
Return (calculated) file nlink count 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.
rpm_count_t rpmfilesFC(rpmfiles fi)
Return file count from file info set.
@ RPMFI_ITER_READ_ARCHIVE_OMIT_HARDLINKS
rpmfileState_e
File States (when installed).
struct headerToken_s * Header
RPM header and data retrieval types.
const unsigned char * rpmfilesFDigest(rpmfiles fi, int ix, int *algo, size_t *len)
Return file (binary) digest of file info set.
rpm_loff_t rpmfilesFSize(rpmfiles fi, int ix)
Return file size from file info set.
uint32_t rpmfilesFDepends(rpmfiles fi, int ix, const uint32_t **fddictp)
Return file depends dictionary from file info set.
const char * rpmfilesFClass(rpmfiles fi, int ix)
Return file class from file info set.
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.
rpmfileAttrs_e
Exported File Attributes (ie RPMTAG_FILEFLAGS)
char * rpmfilesOFN(rpmfiles fi, int ix)
Return original file name from file info set.
rpm_count_t rpmfilesDC(rpmfiles fi)
Return directory count from file info set.