rpm  4.8.1
rpmlib.h
Go to the documentation of this file.
1 #ifndef H_RPMLIB
2 #define H_RPMLIB
3 
11 #include <popt.h>
12 
13 #include <rpm/rpmio.h>
14 #include <rpm/header.h>
15 #include <rpm/rpmtag.h>
16 #include <rpm/rpmds.h> /* XXX move rpmlib provides to rpmds instead */
17 #include <rpm/rpmpgp.h>
18 #ifdef _RPM_4_4_COMPAT
19 #include <rpm/rpmlegacy.h> /* legacy compat definitions if enabled */
20 #endif
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 extern struct rpmMacroContext_s * rpmGlobalMacroContext;
27 
28 extern struct rpmMacroContext_s * rpmCLIMacroContext;
29 
30 extern const char * const RPMVERSION;
31 
32 extern const char * const rpmNAME;
33 
34 extern const char * const rpmEVR;
35 
36 extern const int rpmFLAGS;
37 
44 void headerMergeLegacySigs(Header h, const Header sigh);
45 
53 Header headerRegenSigHeader(const Header h, int noArchiveSize);
54 
55 /* ==================================================================== */
67 };
68 #define RPM_MACHTABLE_COUNT 4
76 int rpmReadConfigFiles(const char * file,
77  const char * target);
78 
85 void rpmGetArchInfo( const char ** name,
86  int * num);
87 
94 void rpmGetOsInfo( const char ** name,
95  int * num);
96 
110 int rpmMachineScore(int type, const char * name);
111 
117 int rpmShowRC(FILE * fp);
118 
126 void rpmSetTables(int archTable, int osTable);
127 
132 void rpmFreeRpmrc(void);
133 
140 int rpmVersionCompare(Header first, Header second);
141 
148 
162 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
163 
172 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
173 
183  const char * fn, Header * hdrp);
184 
194  char ** specFilePtr,
195  char ** cookie);
196 
204 int rpmvercmp(const char * a, const char * b);
205 
209 void rpmFreeFilesystems(void);
210 
217 int rpmGetFilesystemList( const char *** listptr,
218  unsigned int * num);
219 
229 int rpmGetFilesystemUsage(const char ** fileList, rpm_loff_t * fssizes,
230  unsigned int numFiles, rpm_loff_t ** usagesPtr,
231  int flags);
232 
233 #ifdef __cplusplus
234 }
235 #endif
236 
237 #endif /* H_RPMLIB */
const char *const RPMVERSION
int rpmGetFilesystemUsage(const char **fileList, rpm_loff_t *fssizes, unsigned int numFiles, rpm_loff_t **usagesPtr, int flags)
Determine per-file system usage for a list of files.
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:82
struct rpmMacroContext_s * rpmGlobalMacroContext
rpmRC headerCheck(rpmts ts, const void *uh, size_t uc, char **msg)
Check header consistency, performing headerGetEntry() the hard way.
int rpmGetFilesystemList(const char ***listptr, unsigned int *num)
Return (cached) file system mount points.
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char *fn, Header *hdrp)
Return package header from file handle, verifying digests/signatures.
int rpmVersionCompare(Header first, Header second)
Compare headers to determine which header is "newer".
int rpmMachineScore(int type, const char *name)
Return arch/os score of a name.
void headerMergeLegacySigs(Header h, const Header sigh)
Translate and merge legacy signature tags into header.
struct rpmMacroContext_s * rpmCLIMacroContext
void rpmGetOsInfo(const char **name, int *num)
Return current os name and/or number.
const char *const rpmNAME
void rpmSetTables(int archTable, int osTable)
uint64_t rpm_loff_t
Definition: rpmtypes.h:47
rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char **msg)
Return checked and loaded header.
int rpmShowRC(FILE *fp)
Display current rpmrc (and macro) configuration.
void rpmFreeFilesystems(void)
Release storage used by file system usage cache.
rpmRC headerCheckPayloadFormat(Header h)
Check for supported payload format in header.
const char *const rpmEVR
int rpmvercmp(const char *a, const char *b)
Segmented string compare for version or release strings.
void rpmGetArchInfo(const char **name, int *num)
Return current arch name and/or number.
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, char **specFilePtr, char **cookie)
Install source package.
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:59
const int rpmFLAGS
void rpmFreeRpmrc(void)
Destroy rpmrc arch/os compatibility tables.
enum rpmRC_e rpmRC
Package read return codes.
Header headerRegenSigHeader(const Header h, int noArchiveSize)
Regenerate signature header.
rpm_machtable_e
Build and install arch/os table identifiers.
Definition: rpmlib.h:62
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24