rpm  4.14.0
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 _RPM_4_4_COMPAT
20 #warning RPM 4.4.x compatibility layer has been removed in RPM >= 4.14
21 #endif
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 extern struct rpmMacroContext_s * rpmGlobalMacroContext;
28 
29 extern struct rpmMacroContext_s * rpmCLIMacroContext;
30 
31 extern const char * const RPMVERSION;
32 
33 extern const char * const rpmNAME;
34 
35 extern const char * const rpmEVR;
36 
37 extern const int rpmFLAGS;
38 
39 /* ==================================================================== */
51 };
52 #define RPM_MACHTABLE_COUNT 4
60 int rpmReadConfigFiles(const char * file,
61  const char * target);
62 
69 void rpmGetArchInfo( const char ** name,
70  int * num);
71 
77 int rpmGetArchColor(const char *arch);
78 
85 void rpmGetOsInfo( const char ** name,
86  int * num);
87 
101 int rpmMachineScore(int type, const char * name);
102 
108 int rpmShowRC(FILE * fp);
109 
114 void rpmFreeRpmrc(void);
115 
122 int rpmVersionCompare(Header first, Header second);
123 
137 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
138 
147 rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
148 
158  const char * fn, Header * hdrp);
159 
169  char ** specFilePtr,
170  char ** cookie);
171 
179 int rpmvercmp(const char * a, const char * b);
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* H_RPMLIB */
const char *const RPMVERSION
rpm_machtable_e
Build and install arch/os table identifiers.
Definition: rpmlib.h:46
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.