rpm  4.13.90
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 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 extern struct rpmMacroContext_s * rpmGlobalMacroContext;
24 
25 extern struct rpmMacroContext_s * rpmCLIMacroContext;
26 
27 extern const char * const RPMVERSION;
28 
29 extern const char * const rpmNAME;
30 
31 extern const char * const rpmEVR;
32 
33 extern const int rpmFLAGS;
34 
35 /* ==================================================================== */
47 };
48 #define RPM_MACHTABLE_COUNT 4
56 int rpmReadConfigFiles(const char * file,
57  const char * target);
58 
65 void rpmGetArchInfo( const char ** name,
66  int * num);
67 
73 int rpmGetArchColor(const char *arch);
74 
81 void rpmGetOsInfo( const char ** name,
82  int * num);
83 
97 int rpmMachineScore(int type, const char * name);
98 
104 int rpmShowRC(FILE * fp);
105 
110 void rpmFreeRpmrc(void);
111 
118 int rpmVersionCompare(Header first, Header second);
119 
133 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
134 
143 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
144 
154  const char * fn, Header * hdrp);
155 
165  char ** specFilePtr,
166  char ** cookie);
167 
175 int rpmvercmp(const char * a, const char * b);
176 
177 #ifdef __cplusplus
178 }
179 #endif
180 
181 #endif /* H_RPMLIB */
const char *const RPMVERSION
rpm_machtable_e
Build and install arch/os table identifiers.
Definition: rpmlib.h:42
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char *fn, Header *hdrp)
Return package header from file handle, verifying digests/signatures.
struct rpmMacroContext_s * rpmGlobalMacroContext
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.
rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char **msg)
Return checked and loaded header.
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
struct rpmMacroContext_s * rpmCLIMacroContext
const char *const rpmNAME
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:98
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24
int rpmShowRC(FILE *fp)
Display current rpmrc (and macro) configuration.
void rpmGetArchInfo(const char **name, int *num)
Return current arch name and/or number.
const char *const rpmEVR
int rpmvercmp(const char *a, const char *b)
Segmented string compare for version or release strings.
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, char **specFilePtr, char **cookie)
Install source package.
void rpmGetOsInfo(const char **name, int *num)
Return current os name and/or number.
const int rpmFLAGS
rpmRC headerCheck(rpmts ts, const void *uh, size_t uc, char **msg)
Check header consistency, performing headerGetEntry() the hard way.
void rpmFreeRpmrc(void)
Destroy rpmrc arch/os compatibility tables.
int rpmGetArchColor(const char *arch)
Return color for an arch.
enum rpmRC_e rpmRC
Package read return codes.