rpmlib.h
Go to the documentation of this file.
#ifndef H_RPMLIB
#define H_RPMLIB
#include <popt.h>
#include <rpm/rpmio.h>
#include <rpm/header.h>
#include <rpm/rpmtag.h>
#include <rpm/rpmds.h> /* XXX move rpmlib provides to rpmds instead */
#include <rpm/rpmpgp.h>
#ifdef _RPM_4_4_COMPAT
#warning RPM 4.4.x compatibility layer has been removed in RPM >= 4.14
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern struct rpmMacroContext_s * rpmGlobalMacroContext;
extern struct rpmMacroContext_s * rpmCLIMacroContext;
extern const char * const RPMVERSION;
extern const char * const rpmNAME;
extern const char * const rpmEVR;
extern const int rpmFLAGS;
/* ==================================================================== */
enum rpm_machtable_e {
RPM_MACHTABLE_INSTARCH = 0,
RPM_MACHTABLE_INSTOS = 1,
RPM_MACHTABLE_BUILDARCH = 2,
RPM_MACHTABLE_BUILDOS = 3
};
#define RPM_MACHTABLE_COUNT 4
int rpmReadConfigFiles(const char * file,
const char * target);
void rpmGetArchInfo( const char ** name,
int * num);
int rpmGetArchColor(const char *arch);
void rpmGetOsInfo( const char ** name,
int * num);
int rpmMachineScore(int type, const char * name);
int rpmShowRC(FILE * fp);
void rpmFreeRpmrc(void);
int rpmVersionCompare(Header first, Header second);
rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, char ** msg);
rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char ** msg);
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
const char * fn, Header * hdrp);
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
char ** specFilePtr,
char ** cookie);
int rpmvercmp(const char * a, const char * b);
#ifdef __cplusplus
}
#endif
#endif /* H_RPMLIB */
RPMVERSION
const char *const RPMVERSION
rpm_machtable_e
rpm_machtable_e
Build and install arch/os table identifiers.
Definition: rpmlib.h:46
rpmReadPackageFile
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char *fn, Header *hdrp)
Return package header from file handle, verifying digests/signatures.
rpmGlobalMacroContext
struct rpmMacroContext_s * rpmGlobalMacroContext
RPM_MACHTABLE_INSTARCH
Definition: rpmlib.h:47
RPM_MACHTABLE_BUILDARCH
Definition: rpmlib.h:49
rpmVersionCompare
int rpmVersionCompare(Header first, Header second)
Compare headers to determine which header is "newer".
rpmMachineScore
int rpmMachineScore(int type, const char *name)
Return arch/os score of a name.
rpmReadHeader
rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, char **msg)
Return checked and loaded header.
rpmts
struct rpmts_s * rpmts
The main types involved in transaction manipulation.
Definition: rpmtypes.h:63
RPM_MACHTABLE_BUILDOS
Definition: rpmlib.h:50
rpmCLIMacroContext
struct rpmMacroContext_s * rpmCLIMacroContext
rpmNAME
const char *const rpmNAME
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:98
Header
struct headerToken_s * Header
RPM header and data retrieval types.
Definition: rpmtypes.h:24
rpmShowRC
int rpmShowRC(FILE *fp)
Display current rpmrc (and macro) configuration.
rpmGetArchInfo
void rpmGetArchInfo(const char **name, int *num)
Return current arch name and/or number.
rpmEVR
const char *const rpmEVR
rpmvercmp
int rpmvercmp(const char *a, const char *b)
Segmented string compare for version or release strings.
rpmInstallSourcePackage
rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd, char **specFilePtr, char **cookie)
Install source package.
rpmGetOsInfo
void rpmGetOsInfo(const char **name, int *num)
Return current os name and/or number.
rpmFLAGS
const int rpmFLAGS
RPM_MACHTABLE_INSTOS
Definition: rpmlib.h:48
headerCheck
rpmRC headerCheck(rpmts ts, const void *uh, size_t uc, char **msg)
Check header consistency, performing headerGetEntry() the hard way.
rpmFreeRpmrc
void rpmFreeRpmrc(void)
Destroy rpmrc arch/os compatibility tables.
rpmGetArchColor
int rpmGetArchColor(const char *arch)
Return color for an arch.
rpmRC
enum rpmRC_e rpmRC
Package read return codes.