Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/rpmlib.h File Reference

In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not. More...

#include "rpmio.h"
#include "rpmmessages.h"
#include "rpmerr.h"
#include "header.h"
#include "popt.h"

Go to the source code of this file.

Data Structures

struct  rpmlead
struct  rpmRelocation_s
 We pass these around as an array with a sentinel. More...


RPMRC

#define RPMVAR_OPTFLAGS   3
#define RPMVAR_PROVIDES   38
#define RPMVAR_INCLUDE   43
#define RPMVAR_MACROFILES   49
#define RPMVAR_NUM   55
#define RPM_MACHTABLE_COUNT   4
enum  rpm_machtable_e { RPM_MACHTABLE_INSTARCH = 0, RPM_MACHTABLE_INSTOS = 1, RPM_MACHTABLE_BUILDARCH = 2, RPM_MACHTABLE_BUILDOS = 3 }
const char * rpmGetVar (int var)
void rpmSetVar (int var, const char *val)
int rpmReadConfigFiles (const char *file, const char *target)
void rpmGetArchInfo (const char **name, int *num)
void rpmGetOsInfo (const char **name, int *num)
int rpmMachineScore (int type, const char *name)
int rpmShowRC (FILE *fp)
void rpmSetTables (int archTable, int osTable)
void rpmSetMachine (const char *arch, const char *os)
void rpmGetMachine (const char **arch, const char **os)
void rpmFreeRpmrc (void)

RPMTS

#define XFA_SKIPPING(_a)   ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
#define _noTransScripts
#define _noTransTriggers
typedef void *(* HFD_t )(const void *data, rpmTagType type)
 Prototype for headerFreeData() vector.

typedef int(* HGE_t )(Header h, rpmTag tag, rpmTagType *type, void **p, int_32 *c)
 Prototype for headerGetEntry() vector.

typedef int(* HAE_t )(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c)
 Prototype for headerAddEntry() vector.

typedef int(* HME_t )(Header h, rpmTag tag, rpmTagType type, const void *p, int_32 c)
 Prototype for headerModifyEntry() vector.

typedef int(* HRE_t )(Header h, int_32 tag)
 Prototype for headerRemoveEntry() vector.

typedef enum rpmprobFilterFlags_e rpmprobFilterFlags
typedef rpmRelocation_s rpmRelocation
 We pass these around as an array with a sentinel.

typedef enum fileAction_e fileAction
 File disposition(s) during package install/erase transaction.

typedef enum fileTypes_e fileTypes
 File types.

typedef fsmIterator_sFSMI_t
typedef fsm_sFSM_t
typedef rpmpsm_srpmpsm
typedef enum rpmtransFlags_e rpmtransFlags
enum  rpmprobFilterFlags_e {
  RPMPROB_FILTER_NONE = 0, RPMPROB_FILTER_IGNOREOS = (1 << 0), RPMPROB_FILTER_IGNOREARCH = (1 << 1), RPMPROB_FILTER_REPLACEPKG = (1 << 2),
  RPMPROB_FILTER_FORCERELOCATE = (1 << 3), RPMPROB_FILTER_REPLACENEWFILES = (1 << 4), RPMPROB_FILTER_REPLACEOLDFILES = (1 << 5), RPMPROB_FILTER_OLDPACKAGE = (1 << 6),
  RPMPROB_FILTER_DISKSPACE = (1 << 7), RPMPROB_FILTER_DISKNODES = (1 << 8)
}
enum  fileAction_e {
  FA_UNKNOWN = 0, FA_CREATE, FA_COPYIN, FA_COPYOUT,
  FA_BACKUP, FA_SAVE, FA_SKIP, FA_ALTNAME,
  FA_ERASE, FA_SKIPNSTATE, FA_SKIPNETSHARED, FA_SKIPCOLOR
}
 File disposition(s) during package install/erase transaction. More...

enum  fileTypes_e {
  PIPE = 1, CDEV = 2, XDIR = 4, BDEV = 6,
  REG = 8, LINK = 10, SOCK = 12
}
 File types. More...

enum  rpmtransFlags_e {
  RPMTRANS_FLAG_NONE = 0, RPMTRANS_FLAG_TEST = (1 << 0), RPMTRANS_FLAG_BUILD_PROBS = (1 << 1), RPMTRANS_FLAG_NOSCRIPTS = (1 << 2),
  RPMTRANS_FLAG_JUSTDB = (1 << 3), RPMTRANS_FLAG_NOTRIGGERS = (1 << 4), RPMTRANS_FLAG_NODOCS = (1 << 5), RPMTRANS_FLAG_ALLFILES = (1 << 6),
  RPMTRANS_FLAG_KEEPOBSOLETE = (1 << 7), RPMTRANS_FLAG_DIRSTASH = (1 << 9), RPMTRANS_FLAG_REPACKAGE = (1 << 10), RPMTRANS_FLAG_PKGCOMMIT = (1 << 11),
  RPMTRANS_FLAG_PKGUNDO = (1 << 12), RPMTRANS_FLAG_COMMIT = (1 << 13), RPMTRANS_FLAG_UNDO = (1 << 14), RPMTRANS_FLAG_REVERSE = (1 << 15),
  RPMTRANS_FLAG_NOTRIGGERPREIN = (1 << 16), RPMTRANS_FLAG_NOPRE = (1 << 17), RPMTRANS_FLAG_NOPOST = (1 << 18), RPMTRANS_FLAG_NOTRIGGERIN = (1 << 19),
  RPMTRANS_FLAG_NOTRIGGERUN = (1 << 20), RPMTRANS_FLAG_NOPREUN = (1 << 21), RPMTRANS_FLAG_NOPOSTUN = (1 << 22), RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23),
  RPMTRANS_FLAG_NOPAYLOAD = (1 << 24), RPMTRANS_FLAG_APPLYONLY = (1 << 25), RPMTRANS_FLAG_ANACONDA = (1 << 26), RPMTRANS_FLAG_NOMD5 = (1 << 27),
  RPMTRANS_FLAG_NOSUGGEST = (1 << 28), RPMTRANS_FLAG_ADDINDEPS = (1 << 29), RPMTRANS_FLAG_NOCONFIGS = (1 << 30)
}
int rpmVersionCompare (Header first, Header second)
 Compare headers to determine which header is "newer".

int headerVerifyInfo (int il, int dl, const void *pev, void *iv, int negate)
 Perform simple sanity and range checks on header tag(s).

rpmRC headerCheck (rpmts ts, const void *uh, size_t uc, const char **msg)
 Check header consistency, performing headerGetEntry() the hard way.

rpmRC rpmReadHeader (rpmts ts, FD_t fd, Header *hdrp, const char **msg)
 Return checked and loaded header.

int rpmReadPackageFile (rpmts ts, FD_t fd, const char *fn, Header *hdrp)
 Return package header from file handle, verifying digests/signatures.

rpmRC rpmInstallSourcePackage (rpmts ts, FD_t fd, const char **specFilePtr, const char **cookie)
 Install source package.

int rpmGetRpmlibProvides (const char ***provNames, int **provFlags, const char ***provVersions)
int rpmvercmp (const char *a, const char *b)
int rpmCheckRpmlibProvides (const rpmds key)
void rpmShowRpmlibProvides (FILE *fp)

RPMEIU

typedef enum rpmInstallInterfaceFlags_e rpmInstallInterfaceFlags
typedef enum rpmEraseInterfaceFlags_e rpmEraseInterfaceFlags
enum  rpmInstallInterfaceFlags_e {
  INSTALL_NONE = 0, INSTALL_PERCENT = (1 << 0), INSTALL_HASH = (1 << 1), INSTALL_NODEPS = (1 << 2),
  INSTALL_NOORDER = (1 << 3), INSTALL_LABEL = (1 << 4), INSTALL_UPGRADE = (1 << 5), INSTALL_FRESHEN = (1 << 6),
  INSTALL_INSTALL = (1 << 7), INSTALL_ERASE = (1 << 8)
}
enum  rpmEraseInterfaceFlags_e { UNINSTALL_NONE = 0, UNINSTALL_NODEPS = (1 << 0), UNINSTALL_ALLMATCHES = (1 << 1) }

RPMK

enum  rpmtagSignature {
  RPMSIGTAG_SIZE = 1000, RPMSIGTAG_LEMD5_1 = 1001, RPMSIGTAG_PGP = 1002, RPMSIGTAG_LEMD5_2 = 1003,
  RPMSIGTAG_MD5 = 1004, RPMSIGTAG_GPG = 1005, RPMSIGTAG_PGP5 = 1006, RPMSIGTAG_PAYLOADSIZE = 1007,
  RPMSIGTAG_BADSHA1_1 = RPMTAG_BADSHA1_1, RPMSIGTAG_BADSHA1_2 = RPMTAG_BADSHA1_2, RPMSIGTAG_SHA1 = RPMTAG_SHA1HEADER, RPMSIGTAG_DSA = RPMTAG_DSAHEADER,
  RPMSIGTAG_RSA = RPMTAG_RSAHEADER
}
rpmRC rpmVerifySignature (const rpmts ts, char *result)
Header rpmFreeSignature (Header h)

Defines

#define RPMAL_NOMATCH   ((alKey)-1L)
#define RPMDBI_PACKAGES   0
 Pseudo-tags used by the rpmdb iterator API.

#define RPMDBI_DEPENDS   1
#define RPMDBI_LABEL   2
#define RPMDBI_ADDED   3
#define RPMDBI_REMOVED   4
#define RPMDBI_AVAILABLE   5
#define RPMTAG_PKGID   RPMTAG_SIGMD5
#define RPMTAG_HDRID   RPMTAG_SHA1HEADER
#define RPMTAG_N   RPMTAG_NAME
#define RPMTAG_V   RPMTAG_VERSION
#define RPMTAG_R   RPMTAG_RELEASE
#define RPMTAG_E   RPMTAG_EPOCH
#define RPMTAG_SERIAL   RPMTAG_EPOCH
#define RPMTAG_COPYRIGHT   RPMTAG_LICENSE
#define RPMTAG_PROVIDES   RPMTAG_PROVIDENAME
#define RPMTAG_OBSOLETES   RPMTAG_OBSOLETENAME
#define RPMTAG_EXTERNAL_TAG   1000000
#define RPMFILE_STATE_MISSING   -1
#define RPMFILE_ALL   ~(RPMFILE_NONE)
#define RPMSENSE_SENSEMASK   15
#define RPMSENSE_TRIGGER   (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
#define _ALL_REQUIRES_MASK
#define _notpre(_x)   ((_x) & ~RPMSENSE_PREREQ)
#define _INSTALL_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING)
#define _ERASE_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
#define isLegacyPreReq(_x)   (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ)
#define isInstallPreReq(_x)   ((_x) & _INSTALL_ONLY_MASK)
#define isErasePreReq(_x)   ((_x) & _ERASE_ONLY_MASK)
#define RPMLEAD_BINARY   0
#define RPMLEAD_SOURCE   1
#define RPMLEAD_MAGIC0   0xed
#define RPMLEAD_MAGIC1   0xab
#define RPMLEAD_MAGIC2   0xee
#define RPMLEAD_MAGIC3   0xdb
#define RPMLEAD_SIZE   96

Typedefs

typedef enum rpmRC_e rpmRC
 Package read return codes.

typedef rpmts_s * rpmts
typedef Spec_sSpec
typedef void * alKey
typedef int alNum
typedef rpmds_s * rpmds
typedef rpmfi_s * rpmfi
typedef rpmte_s * rpmte
typedef rpmdb_srpmdb
typedef _rpmdbMatchIteratorrpmdbMatchIterator
typedef enum rpmTag_e rpmTag
 Tags identify data in package headers.

typedef enum rpmfileState_e rpmfileState
 File States (when installed).

typedef enum rpmfileAttrs_e rpmfileAttrs
 File Attributes.

typedef enum rpmsenseFlags_e rpmsenseFlags
 Dependency Attributes.


Enumerations

enum  rpmRC_e {
  RPMRC_OK = 0, RPMRC_NOTFOUND = 1, RPMRC_FAIL = 2, RPMRC_NOTTRUSTED = 3,
  RPMRC_NOKEY = 4
}
 Package read return codes. More...

enum  rpmTag_e {
  RPMTAG_HEADERIMAGE = HEADER_IMAGE, RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, RPMTAG_HEADERIMMUTABLE = HEADER_IMMUTABLE, RPMTAG_HEADERREGIONS = HEADER_REGIONS,
  RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, RPMTAG_SIG_BASE = HEADER_SIGBASE, RPMTAG_SIGSIZE = RPMTAG_SIG_BASE+1, RPMTAG_SIGLEMD5_1 = RPMTAG_SIG_BASE+2,
  RPMTAG_SIGPGP = RPMTAG_SIG_BASE+3, RPMTAG_SIGLEMD5_2 = RPMTAG_SIG_BASE+4, RPMTAG_SIGMD5 = RPMTAG_SIG_BASE+5, RPMTAG_SIGGPG = RPMTAG_SIG_BASE+6,
  RPMTAG_SIGPGP5 = RPMTAG_SIG_BASE+7, RPMTAG_BADSHA1_1 = RPMTAG_SIG_BASE+8, RPMTAG_BADSHA1_2 = RPMTAG_SIG_BASE+9, RPMTAG_PUBKEYS = RPMTAG_SIG_BASE+10,
  RPMTAG_DSAHEADER = RPMTAG_SIG_BASE+11, RPMTAG_RSAHEADER = RPMTAG_SIG_BASE+12, RPMTAG_SHA1HEADER = RPMTAG_SIG_BASE+13, RPMTAG_NAME = 1000,
  RPMTAG_VERSION = 1001, RPMTAG_RELEASE = 1002, RPMTAG_EPOCH = 1003, RPMTAG_SUMMARY = 1004,
  RPMTAG_DESCRIPTION = 1005, RPMTAG_BUILDTIME = 1006, RPMTAG_BUILDHOST = 1007, RPMTAG_INSTALLTIME = 1008,
  RPMTAG_SIZE = 1009, RPMTAG_DISTRIBUTION = 1010, RPMTAG_VENDOR = 1011, RPMTAG_GIF = 1012,
  RPMTAG_XPM = 1013, RPMTAG_LICENSE = 1014, RPMTAG_PACKAGER = 1015, RPMTAG_GROUP = 1016,
  RPMTAG_CHANGELOG = 1017, RPMTAG_SOURCE = 1018, RPMTAG_PATCH = 1019, RPMTAG_URL = 1020,
  RPMTAG_OS = 1021, RPMTAG_ARCH = 1022, RPMTAG_PREIN = 1023, RPMTAG_POSTIN = 1024,
  RPMTAG_PREUN = 1025, RPMTAG_POSTUN = 1026, RPMTAG_OLDFILENAMES = 1027, RPMTAG_FILESIZES = 1028,
  RPMTAG_FILESTATES = 1029, RPMTAG_FILEMODES = 1030, RPMTAG_FILEUIDS = 1031, RPMTAG_FILEGIDS = 1032,
  RPMTAG_FILERDEVS = 1033, RPMTAG_FILEMTIMES = 1034, RPMTAG_FILEMD5S = 1035, RPMTAG_FILELINKTOS = 1036,
  RPMTAG_FILEFLAGS = 1037, RPMTAG_ROOT = 1038, RPMTAG_FILEUSERNAME = 1039, RPMTAG_FILEGROUPNAME = 1040,
  RPMTAG_EXCLUDE = 1041, RPMTAG_EXCLUSIVE = 1042, RPMTAG_ICON = 1043, RPMTAG_SOURCERPM = 1044,
  RPMTAG_FILEVERIFYFLAGS = 1045, RPMTAG_ARCHIVESIZE = 1046, RPMTAG_PROVIDENAME = 1047, RPMTAG_REQUIREFLAGS = 1048,
  RPMTAG_REQUIRENAME = 1049, RPMTAG_REQUIREVERSION = 1050, RPMTAG_NOSOURCE = 1051, RPMTAG_NOPATCH = 1052,
  RPMTAG_CONFLICTFLAGS = 1053, RPMTAG_CONFLICTNAME = 1054, RPMTAG_CONFLICTVERSION = 1055, RPMTAG_DEFAULTPREFIX = 1056,
  RPMTAG_BUILDROOT = 1057, RPMTAG_INSTALLPREFIX = 1058, RPMTAG_EXCLUDEARCH = 1059, RPMTAG_EXCLUDEOS = 1060,
  RPMTAG_EXCLUSIVEARCH = 1061, RPMTAG_EXCLUSIVEOS = 1062, RPMTAG_AUTOREQPROV = 1063, RPMTAG_RPMVERSION = 1064,
  RPMTAG_TRIGGERSCRIPTS = 1065, RPMTAG_TRIGGERNAME = 1066, RPMTAG_TRIGGERVERSION = 1067, RPMTAG_TRIGGERFLAGS = 1068,
  RPMTAG_TRIGGERINDEX = 1069, RPMTAG_VERIFYSCRIPT = 1079, RPMTAG_CHANGELOGTIME = 1080, RPMTAG_CHANGELOGNAME = 1081,
  RPMTAG_CHANGELOGTEXT = 1082, RPMTAG_BROKENMD5 = 1083, RPMTAG_PREREQ = 1084, RPMTAG_PREINPROG = 1085,
  RPMTAG_POSTINPROG = 1086, RPMTAG_PREUNPROG = 1087, RPMTAG_POSTUNPROG = 1088, RPMTAG_BUILDARCHS = 1089,
  RPMTAG_OBSOLETENAME = 1090, RPMTAG_VERIFYSCRIPTPROG = 1091, RPMTAG_TRIGGERSCRIPTPROG = 1092, RPMTAG_DOCDIR = 1093,
  RPMTAG_COOKIE = 1094, RPMTAG_FILEDEVICES = 1095, RPMTAG_FILEINODES = 1096, RPMTAG_FILELANGS = 1097,
  RPMTAG_PREFIXES = 1098, RPMTAG_INSTPREFIXES = 1099, RPMTAG_TRIGGERIN = 1100, RPMTAG_TRIGGERUN = 1101,
  RPMTAG_TRIGGERPOSTUN = 1102, RPMTAG_AUTOREQ = 1103, RPMTAG_AUTOPROV = 1104, RPMTAG_CAPABILITY = 1105,
  RPMTAG_SOURCEPACKAGE = 1106, RPMTAG_OLDORIGFILENAMES = 1107, RPMTAG_BUILDPREREQ = 1108, RPMTAG_BUILDREQUIRES = 1109,
  RPMTAG_BUILDCONFLICTS = 1110, RPMTAG_BUILDMACROS = 1111, RPMTAG_PROVIDEFLAGS = 1112, RPMTAG_PROVIDEVERSION = 1113,
  RPMTAG_OBSOLETEFLAGS = 1114, RPMTAG_OBSOLETEVERSION = 1115, RPMTAG_DIRINDEXES = 1116, RPMTAG_BASENAMES = 1117,
  RPMTAG_DIRNAMES = 1118, RPMTAG_ORIGDIRINDEXES = 1119, RPMTAG_ORIGBASENAMES = 1120, RPMTAG_ORIGDIRNAMES = 1121,
  RPMTAG_OPTFLAGS = 1122, RPMTAG_DISTURL = 1123, RPMTAG_PAYLOADFORMAT = 1124, RPMTAG_PAYLOADCOMPRESSOR = 1125,
  RPMTAG_PAYLOADFLAGS = 1126, RPMTAG_INSTALLCOLOR = 1127, RPMTAG_INSTALLTID = 1128, RPMTAG_REMOVETID = 1129,
  RPMTAG_SHA1RHN = 1130, RPMTAG_RHNPLATFORM = 1131, RPMTAG_PLATFORM = 1132, RPMTAG_PATCHESNAME = 1133,
  RPMTAG_PATCHESFLAGS = 1134, RPMTAG_PATCHESVERSION = 1135, RPMTAG_CACHECTIME = 1136, RPMTAG_CACHEPKGPATH = 1137,
  RPMTAG_CACHEPKGSIZE = 1138, RPMTAG_CACHEPKGMTIME = 1139, RPMTAG_FILECOLORS = 1140, RPMTAG_FILECLASS = 1141,
  RPMTAG_CLASSDICT = 1142, RPMTAG_FILEDEPENDSX = 1143, RPMTAG_FILEDEPENDSN = 1144, RPMTAG_DEPENDSDICT = 1145,
  RPMTAG_SOURCEPKGID = 1146, RPMTAG_FIRSTFREE_TAG
}
 Tags identify data in package headers. More...

enum  rpmfileState_e {
  RPMFILE_STATE_NORMAL = 0, RPMFILE_STATE_REPLACED = 1, RPMFILE_STATE_NOTINSTALLED = 2, RPMFILE_STATE_NETSHARED = 3,
  RPMFILE_STATE_WRONGCOLOR = 4
}
 File States (when installed). More...

enum  rpmfileAttrs_e {
  RPMFILE_NONE = 0, RPMFILE_CONFIG = (1 << 0), RPMFILE_DOC = (1 << 1), RPMFILE_ICON = (1 << 2),
  RPMFILE_MISSINGOK = (1 << 3), RPMFILE_NOREPLACE = (1 << 4), RPMFILE_SPECFILE = (1 << 5), RPMFILE_GHOST = (1 << 6),
  RPMFILE_LICENSE = (1 << 7), RPMFILE_README = (1 << 8), RPMFILE_EXCLUDE = (1 << 9), RPMFILE_UNPATCHED = (1 << 10),
  RPMFILE_PUBKEY = (1 << 11)
}
 File Attributes. More...

enum  rpmsenseFlags_e {
  RPMSENSE_ANY = 0, RPMSENSE_SERIAL = (1 << 0), RPMSENSE_LESS = (1 << 1), RPMSENSE_GREATER = (1 << 2),
  RPMSENSE_EQUAL = (1 << 3), RPMSENSE_PROVIDES = (1 << 4), RPMSENSE_CONFLICTS = (1 << 5), RPMSENSE_PREREQ = (1 << 6),
  RPMSENSE_OBSOLETES = (1 << 7), RPMSENSE_INTERP = (1 << 8), RPMSENSE_SCRIPT_PRE = ((1 << 9)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_POST = ((1 << 10)|RPMSENSE_PREREQ),
  RPMSENSE_SCRIPT_PREUN = ((1 << 11)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_POSTUN = ((1 << 12)|RPMSENSE_PREREQ), RPMSENSE_SCRIPT_VERIFY = (1 << 13), RPMSENSE_FIND_REQUIRES = (1 << 14),
  RPMSENSE_FIND_PROVIDES = (1 << 15), RPMSENSE_TRIGGERIN = (1 << 16), RPMSENSE_TRIGGERUN = (1 << 17), RPMSENSE_TRIGGERPOSTUN = (1 << 18),
  RPMSENSE_SCRIPT_PREP = (1 << 20), RPMSENSE_SCRIPT_BUILD = (1 << 21), RPMSENSE_SCRIPT_INSTALL = (1 << 22), RPMSENSE_SCRIPT_CLEAN = (1 << 23),
  RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), RPMSENSE_TRIGGERPREIN = (1 << 25), RPMSENSE_KEYRING = (1 << 26), RPMSENSE_PATCHES = (1 << 27),
  RPMSENSE_CONFIG = (1 << 28)
}
 Dependency Attributes. More...


Functions

void * _free (const void *p)
 Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.

int headerNVR (Header h, const char **np, const char **vp, const char **rp)
int headerNEVRA (Header h, const char **np, const char **ep, const char **vp, const char **rp, const char **ap)
void headerMergeLegacySigs (Header h, const Header sigh)
Header headerRegenSigHeader (const Header h, int noArchiveSize)
int rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c)
const char *const tagName (int tag)
 Return name of tag from value.

int tagValue (const char *tagstr)
 Return value of tag from name.

void freeFilesystems (void)
 Release storage used by file system usage cache.

int rpmGetFilesystemList (const char ***listptr, int *num)
 Return (cached) file system mount points.

int rpmGetFilesystemUsage (const char **fileList, int_32 *fssizes, int numFiles, uint_32 **usagesPtr, int flags)
 Determine per-file system usage for a list of files.


Variables

MacroContext_srpmGlobalMacroContext
MacroContext_srpmCLIMacroContext
const char * RPMVERSION
const char * rpmNAME
const char * rpmEVR
int rpmFLAGS
const struct headerTagTableEntry_srpmTagTable
 Automatically generated table of tag name/value pairs.

const int rpmTagTableSize
 Number of entries in rpmTagTable.

const struct headerSprintfExtension_s rpmHeaderFormats []
 Table of query format extensions.


Detailed Description

In Memoriam: Steve Taylor <staylor@redhat.com> was here, now he's not.

Definition in file rpmlib.h.


Define Documentation

#define _ALL_REQUIRES_MASK
 

Value:

Definition at line 506 of file rpmlib.h.

Referenced by addReqProv().

#define _ERASE_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)
 

Definition at line 524 of file rpmlib.h.

#define _INSTALL_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_RPMLIB|RPMSENSE_KEYRING)
 

Definition at line 522 of file rpmlib.h.

#define _notpre _x       ((_x) & ~RPMSENSE_PREREQ)
 

Definition at line 521 of file rpmlib.h.

Referenced by identifyDepend().

#define _noTransScripts
 

Value:

Definition at line 971 of file rpmlib.h.

Referenced by installArgCallback(), main(), and rpmtsRun().

#define _noTransTriggers
 

Value:

Definition at line 978 of file rpmlib.h.

Referenced by installArgCallback(), main(), and rpmtsRun().

#define isErasePreReq _x       ((_x) & _ERASE_ONLY_MASK)
 

Definition at line 529 of file rpmlib.h.

Referenced by rpmtsOrder().

#define isInstallPreReq _x       ((_x) & _INSTALL_ONLY_MASK)
 

Definition at line 528 of file rpmlib.h.

Referenced by rpmdbAdd(), and rpmtsOrder().

#define isLegacyPreReq _x       (((_x) & _ALL_REQUIRES_MASK) == RPMSENSE_PREREQ)
 

Definition at line 527 of file rpmlib.h.

Referenced by identifyDepend(), and rpmtsOrder().

#define RPM_MACHTABLE_COUNT   4
 

No. of arch/os tables.

Definition at line 572 of file rpmlib.h.

#define RPMAL_NOMATCH   ((alKey)-1L)
 

Definition at line 81 of file rpmlib.h.

Referenced by addRelation(), initrpm(), rpmalAdd(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmteAddedKey(), rpmteDependsOnKey(), rpmteSetAddedKey(), rpmtsAddAvailableElement(), rpmtsAddEraseElement(), rpmtsAddInstallElement(), and rpmtsOrder().

#define RPMDBI_ADDED   3
 

Added package headers.

Definition at line 215 of file rpmlib.h.

Referenced by openDatabase(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbRemove(), tagName(), and tagValue().

#define RPMDBI_AVAILABLE   5
 

Available package headers.

Definition at line 217 of file rpmlib.h.

Referenced by openDatabase(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbRemove(), tagName(), and tagValue().

#define RPMDBI_DEPENDS   1
 

Dependency resolution cache.

Definition at line 213 of file rpmlib.h.

Referenced by db3New(), openDatabase(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbRemove(), rpmtsCheck(), tagName(), tagValue(), and unsatisfiedDepend().

#define RPMDBI_LABEL   2
 

Fingerprint search marker.

Definition at line 214 of file rpmlib.h.

Referenced by rpmdbInitIterator(), rpmErase(), rpmQueryVerify(), rpmts_AddErase(), and rpmtsInitIterator().

#define RPMDBI_PACKAGES   0
 

Pseudo-tags used by the rpmdb iterator API.

Installed package headers.

Definition at line 212 of file rpmlib.h.

Referenced by db3New(), dbiFindMatches(), dbiOpen(), dbiTagsInit(), handleInstInstalledFiles(), handleRmvdInstalledFiles(), main(), markReplacedFiles(), openDatabase(), rpmdb_length(), rpmdb_Match(), rpmdb_subscript(), rpmdbAdd(), rpmdbFindByFile(), rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmpsmStage(), rpmQueryVerify(), rpmts_AddErase(), rpmts_Match(), tagName(), and tagValue().

#define RPMDBI_REMOVED   4
 

Removed package headers.

Definition at line 216 of file rpmlib.h.

Referenced by openDatabase(), rpmdbAdd(), rpmdbMoveDatabase(), rpmdbRemove(), tagName(), and tagValue().

#define RPMFILE_ALL   ~(RPMFILE_NONE)
 

Definition at line 457 of file rpmlib.h.

#define RPMFILE_STATE_MISSING   -1
 

Definition at line 434 of file rpmlib.h.

Referenced by rpmfiFState(), and showQueryPackage().

#define RPMLEAD_BINARY   0
 

Definition at line 1044 of file rpmlib.h.

Referenced by packageBinaries(), rpmpsmStage(), and writeRPM().

#define RPMLEAD_MAGIC0   0xed
 

Definition at line 1047 of file rpmlib.h.

#define RPMLEAD_MAGIC1   0xab
 

Definition at line 1048 of file rpmlib.h.

#define RPMLEAD_MAGIC2   0xee
 

Definition at line 1049 of file rpmlib.h.

#define RPMLEAD_MAGIC3   0xdb
 

Definition at line 1050 of file rpmlib.h.

#define RPMLEAD_SIZE   96
 

Don't rely on sizeof(struct)

Definition at line 1052 of file rpmlib.h.

#define RPMLEAD_SOURCE   1
 

Definition at line 1045 of file rpmlib.h.

Referenced by legacyRetrofit(), packageSources(), rewriteRPM(), and writeRPM().

#define RPMSENSE_SENSEMASK   15
 

Definition at line 500 of file rpmlib.h.

Referenced by addReqProv(), parseRCPOT(), rpmdsAnyMatchesDep(), rpmdsCompare(), rpmdsNewDNEVR(), rpmdsNVRMatchesDep(), triggercondsTag(), and unsatisfiedDepend().

#define RPMSENSE_TRIGGER   (RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)
 

Definition at line 503 of file rpmlib.h.

Referenced by addReqProv().

#define RPMTAG_COPYRIGHT   RPMTAG_LICENSE
 

#define RPMTAG_E   RPMTAG_EPOCH
 

#define RPMTAG_EXTERNAL_TAG   1000000
 

Definition at line 422 of file rpmlib.h.

Referenced by convertExistingAMD(), and main().

#define RPMTAG_HDRID   RPMTAG_SHA1HEADER
 

#define RPMTAG_N   RPMTAG_NAME
 

#define RPMTAG_OBSOLETES   RPMTAG_OBSOLETENAME
 

#define RPMTAG_PKGID   RPMTAG_SIGMD5
 

#define RPMTAG_PROVIDES   RPMTAG_PROVIDENAME
 

#define RPMTAG_R   RPMTAG_RELEASE
 

#define RPMTAG_SERIAL   RPMTAG_EPOCH
 

#define RPMTAG_V   RPMTAG_VERSION
 

#define RPMVAR_INCLUDE   43
 

Definition at line 538 of file rpmlib.h.

Referenced by doReadRC().

#define RPMVAR_MACROFILES   49
 

Definition at line 539 of file rpmlib.h.

Referenced by doReadRC(), and rpmReadRC().

#define RPMVAR_NUM   55
 

Definition at line 541 of file rpmlib.h.

#define RPMVAR_OPTFLAGS   3
 

Definition at line 536 of file rpmlib.h.

Referenced by rpmRebuildTargetVars(), and setDefaults().

#define RPMVAR_PROVIDES   38
 

Definition at line 537 of file rpmlib.h.

Referenced by doReadRC(), and unsatisfiedDepend().

#define XFA_SKIPPING _a       ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
 

Definition at line 813 of file rpmlib.h.

Referenced by dnlInitIterator(), fsmCommitLinks(), fsmMakeLinks(), fsmStage(), handleInstInstalledFiles(), handleOverlappedFiles(), rpmtsRun(), saveHardLink(), and skipFiles().


Typedef Documentation

typedef void* alKey
 

An added/available package retrieval key.

Definition at line 80 of file rpmlib.h.

Referenced by addRelation(), alKey2Num(), alNum2Key(), removePackage(), rpmal_Add(), rpmal_AddProvides(), rpmal_Del(), rpmalAdd(), rpmalAddProvides(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmalDel(), rpmalMakeIndex(), rpmalSatisfiesDepend(), rpmteAddedKey(), rpmteDependsOnKey(), rpmteNew(), rpmteSetAddedKey(), rpmtsAddInstallElement(), rpmtsOrder(), and rpmtsRun().

typedef int alNum
 

An added/available package retrieval index.

Definition at line 87 of file rpmlib.h.

Referenced by alKey2Num(), alNum2Key(), rpmalAdd(), rpmalAddProvides(), and rpmalDel().

typedef enum fileAction_e fileAction
 

File disposition(s) during package install/erase transaction.

Referenced by fileActionString(), handleInstInstalledFiles(), relocateFileList(), rpmfiDecideFate(), rpmpsmStage(), rpmtsRun(), and rpmtsUpdateDSI().

typedef enum fileTypes_e fileTypes
 

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

Referenced by ftstring(), relocateFileList(), rpmfiCompare(), rpmfiDecideFate(), and whatis().

typedef int(* HAE_t)(Header h, rpmTag tag, rpmTagType type, const void * p, int_32 c)
 

Prototype for headerAddEntry() vector.

Duplicate tags are okay, but only defined for iteration (with the exceptions noted below). While you are allowed to add i18n string arrays through this function, you probably don't mean to. See headerAddI18NString() instead.

Parameters:
h  header
tag  tag
type  tag value data type
p  pointer to tag value(s)
c  number of values
Returns:
1 on success, 0 on failure

Definition at line 728 of file rpmlib.h.

Referenced by compressFilelist(), expandFilelist(), headerMergeLegacySigs(), and relocateFileList().

typedef void*(* HFD_t)( const void * data, rpmTagType type)
 

Prototype for headerFreeData() vector.

Parameters:
data  address of data (or NULL)
type  type of data (or -1 to force free)
Returns:
NULL always

Definition at line 690 of file rpmlib.h.

Referenced by addReqProv(), compressFilelist(), handleOneTrigger(), handlePreambleTag(), headerMergeLegacySigs(), headerRegenSigHeader(), instprefixTag(), isMemberInEntry(), mireSkip(), providePackageNVR(), relocateFileList(), rpmdbAdd(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmdsFree(), rpmfiBuildFNames(), rpmfiFree(), rpmfiNew(), rpmInstallSourcePackage(), rpmpsmStage(), runImmedTriggers(), runInstScript(), runScript(), timeCheck(), triggercondsTag(), and triggertypeTag().

typedef int(* HGE_t)(Header h, rpmTag tag, rpmTagType * type, void ** p, int_32 * c)
 

Prototype for headerGetEntry() vector.

Will never return RPM_I18NSTRING_TYPE! RPM_STRING_TYPE elements with RPM_I18NSTRING_TYPE equivalent entries are translated (if HEADER_I18NTABLE entry is present).

Parameters:
h  header
tag  tag
Return values:
type  address of tag value data type (or NULL)
p  address of pointer to tag value(s) (or NULL)
c  address of number of values (or NULL)
Returns:
1 on success, 0 on failure

Definition at line 707 of file rpmlib.h.

Referenced by addFileToTag(), addReqProv(), addTE(), compressFilelist(), fssizesTag(), ftsCacheUpdate(), handleOneTrigger(), handlePreambleTag(), handleRmvdInstalledFiles(), hGetColor(), i18nTag(), IDTXglob(), IDTXload(), instprefixTag(), isMemberInEntry(), markReplacedFiles(), mireSkip(), processPackageFiles(), providePackageNVR(), relocateFileList(), rpmdbAdd(), rpmdbFindByFile(), rpmdbFindFpList(), rpmdbRemove(), rpmdsNew(), rpmdsNVRMatchesDep(), rpmdsThis(), rpmfiBuildFNames(), rpmfiNew(), rpmInstallLoadMacros(), rpmInstallSourcePackage(), rpmpsmStage(), rpmtsAddInstallElement(), runImmedTriggers(), runInstScript(), runScript(), stashSt(), timeCheck(), triggercondsTag(), triggertypeTag(), and writeRPM().

typedef int(* HME_t)(Header h, rpmTag tag, rpmTagType type, const void * p, int_32 c)
 

Prototype for headerModifyEntry() vector.

If there are multiple entries with this tag, the first one gets replaced.

Parameters:
h  header
tag  tag
type  tag value data type
p  pointer to tag value(s)
c  number of values
Returns:
1 on success, 0 on failure

Definition at line 743 of file rpmlib.h.

Referenced by relocateFileList().

typedef int(* HRE_t)(Header h, int_32 tag)
 

Prototype for headerRemoveEntry() vector.

Delete tag in header. Removes all entries of type tag from the header, returns 1 if none were found.

Parameters:
h  header
tag  tag
Returns:
0 on success, 1 on failure (INCONSISTENT)

Definition at line 757 of file rpmlib.h.

Referenced by compressFilelist(), and expandFilelist().

typedef struct rpmds_s* rpmds
 

Dependency tag sets from a header, so that a header can be discarded early.

Definition at line 93 of file rpmlib.h.

Referenced by addRelation(), checkPackageDeps(), checkPackageSet(), dsFromDs(), ensureOlder(), ftsStashLatest(), handleOneTrigger(), printDeps(), rpmalAdd(), rpmalAddProvides(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmalSatisfiesDepend(), rpmCheckRpmlibProvides(), rpmds_Wrap(), rpmdsAnyMatchesDep(), rpmdsColor(), rpmdsCompare(), rpmdsCount(), rpmdsDNEVR(), rpmdsDup(), rpmdsEVR(), rpmdsFind(), rpmdsFlags(), rpmdsFree(), rpmdsInit(), rpmdsIx(), rpmdsMerge(), rpmdsN(), rpmdsNew(), rpmdsNewDNEVR(), rpmdsNext(), rpmdsNoPromote(), rpmdsNotify(), rpmdsNVRMatchesDep(), rpmdsPrint(), rpmdsProblem(), rpmdsRefs(), rpmdsSetColor(), rpmdsSetIx(), rpmdsSetNoPromote(), rpmdsSetRefs(), rpmdsSingle(), rpmdsTagN(), rpmdsThis(), rpmfcApply(), rpmfcELF(), rpmfcFileDep(), rpmfcGenerateDepends(), rpmfcHelper(), rpmfcSCRIPT(), rpmfiBuildFDeps(), rpmInstall(), rpmShowRpmlibProvides(), rpmte_DS(), rpmteColorDS(), rpmteDS(), rpmts_SolveCallback(), rpmtsAddAvailableElement(), rpmtsAddInstallElement(), rpmtsAvailable(), rpmtsCheck(), rpmtsOrder(), rpmtsSetSolveCallback(), rpmtsSolve(), unsatisfiedDepend(), XrpmdsLink(), XrpmdsUnlink(), and zapRelation().

typedef struct rpmfi_s* rpmfi
 

File info tag sets from a header, so that a header can be discarded early.

Definition at line 98 of file rpmlib.h.

Referenced by cpio_doio(), dnlInitIterator(), dnlNextIterator(), fiFromFi(), freePackage(), freeSpec(), fsmGetFi(), fsmMapAttrs(), fsmMapPath(), fsmMkdirs(), fsmSetup(), fsmStage(), genCpioListAndHeader(), handleInstInstalledFiles(), handleOneTrigger(), handleOverlappedFiles(), handleRmvdInstalledFiles(), mapFind(), mapInitIterator(), mapNextIterator(), markReplacedFiles(), relocateFileList(), rpmalAdd(), rpmalDel(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfi_Wrap(), rpmfiBN(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmfiColor(), rpmfiCompare(), rpmfiDC(), rpmfiDecideFate(), rpmfiDN(), rpmfiDX(), rpmfiFC(), rpmfiFClass(), rpmfiFColor(), rpmfiFDepends(), rpmfiFFlags(), rpmfiFGroup(), rpmfiFInode(), rpmfiFLink(), rpmfiFMode(), rpmfiFMtime(), rpmfiFN(), rpmfiFNlink(), rpmfiFRdev(), rpmfiFree(), rpmfiFSize(), rpmfiFState(), rpmfiFUser(), rpmfiFX(), rpmfiInit(), rpmfiInitD(), rpmfiMD5(), rpmfiNew(), rpmfiNext(), rpmfiNextD(), rpmfiSetDX(), rpmfiSetFX(), rpmfiTypeString(), rpmfiVFlags(), rpmInstallLoadMacros(), rpmInstallSourcePackage(), rpmpsmNew(), rpmpsmStage(), rpmte_FI(), rpmteColorDS(), rpmteFI(), rpmtsAddAvailableElement(), rpmtsCheck(), rpmtsiFi(), rpmtsRun(), rpmVerifyFile(), rpmVerifyScript(), runImmedTriggers(), runInstScript(), runScript(), runTriggers(), saveHardLink(), showQueryPackage(), showVerifyPackage(), skipFiles(), verifyHeader(), writeFile(), XrpmfiLink(), and XrpmfiUnlink().

typedef enum rpmfileAttrs_e rpmfileAttrs
 

File Attributes.

Referenced by rpmfcGenerateDepends(), rpmVerifyFile(), showQueryPackage(), and verifyHeader().

typedef enum rpmfileState_e rpmfileState
 

File States (when installed).

Referenced by rpmfiFState(), and showQueryPackage().

typedef enum rpmprobFilterFlags_e rpmprobFilterFlags
 

Todo:
Generalize filter mechanism.

Referenced by rpmInstall(), rpmts_SetProbFilter(), rpmtsFilterFlags(), and rpmtsRun().

typedef struct rpmpsm_s* rpmpsm
 

Package state machine data.

Definition at line 846 of file rpmlib.h.

typedef enum rpmRC_e rpmRC
 

Package read return codes.

Referenced by dbiFindByLabel(), dbiFindMatches(), ftsStashLatest(), handleOneTrigger(), headerCheck(), IDTXglob(), main(), markReplacedFiles(), miFreeHeader(), printSize(), readLead(), readRPM(), rpmdbAdd(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdbSetHdrChk(), rpmGraph(), rpmInstallSource(), rpmInstallSourcePackage(), rpmMkdirPath(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmReadPackageFile(), rpmReadSignature(), rpmReSign(), rpmSigString(), rpmts_HdrCheck(), rpmts_HdrFromFdno(), rpmtsFindPubkey(), rpmtsRun(), rpmtsSolve(), rpmVerifySignature(), rpmVerifySignatures(), runImmedTriggers(), runInstScript(), runScript(), runTriggers(), verifyGPGSignature(), verifyMD5Signature(), verifyPGPSignature(), verifySHA1Signature(), verifySizeSignature(), and writeLead().

typedef struct rpmRelocation_s rpmRelocation
 

We pass these around as an array with a sentinel.

typedef enum rpmsenseFlags_e rpmsenseFlags
 

Dependency Attributes.

Referenced by addReqProv(), handlePreambleTag(), parseBits(), and parseRCPOT().

typedef enum rpmTag_e rpmTag
 

Tags identify data in package headers.

Note:
tags should not have value 0!

Referenced by addReqProv(), checkForRequired(), db3New(), db3open(), dbiOpen(), hdr_dsFromHeader(), hdr_fiFromHeader(), IDTXglob(), IDTXload(), isMemberInEntry(), mireDup(), rpmdbInitIterator(), rpmdbSetIteratorRE(), rpmdsFree(), rpmdsNew(), rpmdsSingle(), rpmdsTagN(), rpmdsThis(), rpmfiBuildFDeps(), rpmfiBuildFNames(), rpmfiNew(), rpmmi_Pattern(), rpmte_DS(), rpmte_FI(), rpmteColorDS(), rpmteDS(), rpmteFI(), rpmts_IDTXglob(), rpmts_IDTXload(), rpmtsInitIterator(), and rpmtsSolve().

typedef struct rpmte_s* rpmte
 

An element of a transaction set, i.e. a TR_ADDED or TR_REMOVED package.

Definition at line 103 of file rpmlib.h.

Referenced by addQ(), addRelation(), addTE(), delTE(), ensureOlder(), handleInstInstalledFiles(), handleOverlappedFiles(), ignoreDep(), markLoop(), relocateFileList(), removePackage(), rpmfiNew(), rpmGraph(), rpmpsmNew(), rpmte_Wrap(), rpmteA(), rpmteAddedKey(), rpmteCleanDS(), rpmteColor(), rpmteColorDS(), rpmteDBOffset(), rpmteDegree(), rpmteDependsOnKey(), rpmteDepth(), rpmteDS(), rpmteE(), rpmteFd(), rpmteFI(), rpmteFree(), rpmteFreeTSI(), rpmteKey(), rpmteN(), rpmteNEVR(), rpmteNEVRA(), rpmteNew(), rpmteNewTSI(), rpmteNpreds(), rpmteO(), rpmteParent(), rpmtePkgFileSize(), rpmteR(), rpmteSetAddedKey(), rpmteSetColor(), rpmteSetDegree(), rpmteSetDepth(), rpmteSetNpreds(), rpmteSetParent(), rpmteSetTree(), rpmteTree(), rpmteTSI(), rpmteType(), rpmteV(), rpmts_iternext(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsCheckDSIProblems(), rpmtsClean(), rpmtsElement(), rpmtsEmpty(), rpmtsGetKeys(), rpmtsiFi(), rpmtsiNext(), rpmtsiNextElement(), rpmtsNotify(), rpmtsOrder(), rpmtsRelocateElement(), rpmtsRun(), rpmtsSetRelocateElement(), and zapRelation().

typedef enum rpmtransFlags_e rpmtransFlags
 

Bit(s) to control rpmtsRun() operation.

Referenced by rpmRollback(), rpmts_Rollback(), rpmts_SetFlags(), rpmtsFlags(), and rpmtsSetFlags().

typedef struct rpmts_s* rpmts
 

The RPM Transaction Set. Transaction sets are inherently unordered! RPM may reorder transaction sets to reduce errors. In general, installs/upgrades are done before strict removals, and prerequisite ordering is done on installs/upgrades.

Definition at line 71 of file rpmlib.h.

Referenced by addRelation(), addTE(), build(), buildForTarget(), buildSpec(), checkDependentConflicts(), checkDependentPackages(), checkPackageDeps(), checkPackageSet(), checkSpec(), cpio_doio(), ensureOlder(), fsmGetTs(), fsmMapAttrs(), fsmSetup(), fsmStage(), ftsCachePrint(), ftsCacheUpdate(), ftsPrint(), ftsStashLatest(), genCpioListAndHeader(), handleInstInstalledFiles(), handleOneTrigger(), handleOverlappedFiles(), handleRmvdInstalledFiles(), hdr_fiFromHeader(), headerCheck(), IDTXglob(), IDTXload(), initGlobs(), main(), mapInitIterator(), markReplacedFiles(), parseSpec(), readRPM(), relocateFileList(), removePackage(), rpmcliImportPubkey(), rpmcliImportPubkeys(), rpmcliQuery(), rpmcliShowMatches(), rpmcliSign(), rpmcliVerify(), rpmdbAdd(), rpmdbRebuild(), rpmdbRemove(), rpmdbSetHdrChk(), rpmErase(), rpmfiNew(), rpmGraph(), rpmInstall(), rpmInstallSource(), rpmInstallSourcePackage(), rpmpsmNew(), rpmpsmStage(), rpmQueryVerify(), rpmReadHeader(), rpmReadPackageFile(), rpmReSign(), rpmRollback(), rpmspecQuery(), rpmteNew(), rpmts_SolveCallback(), rpmtsAddAvailableElement(), rpmtsAddEraseElement(), rpmtsAddInstallElement(), rpmtsAvailable(), rpmtsCheck(), rpmtsCheckDSIProblems(), rpmtsChrootDone(), rpmtsClean(), rpmtsCleanDig(), rpmtsCloseDB(), rpmtsCloseSDB(), rpmtsColor(), rpmtsCreate(), rpmtsCurrDir(), rpmtsDig(), rpmtsElement(), rpmtsEmpty(), rpmtsFilterFlags(), rpmtsFindPubkey(), rpmtsFlags(), rpmtsFree(), rpmtsGetKeys(), rpmtsGetRdb(), rpmtsGetTid(), rpmtsInitDB(), rpmtsInitDSI(), rpmtsInitIterator(), rpmtsNElements(), rpmtsNotify(), rpmtsOp(), rpmtsOpenDB(), rpmtsOpenSDB(), rpmtsOrder(), rpmtsPrintStats(), rpmtsProblems(), rpmtsPubkey(), rpmtsRebuildDB(), rpmtsRelocateElement(), rpmtsRootDir(), rpmtsRun(), rpmtsScriptFd(), rpmtsSetChrootDone(), rpmtsSetColor(), rpmtsSetCurrDir(), rpmtsSetFlags(), rpmtsSetNotifyCallback(), rpmtsSetRelocateElement(), rpmtsSetRootDir(), rpmtsSetScriptFd(), rpmtsSetSig(), rpmtsSetSolveCallback(), rpmtsSetSpec(), rpmtsSetTid(), rpmtsSetVSFlags(), rpmtsSig(), rpmtsSiglen(), rpmtsSignature(), rpmtsSigtag(), rpmtsSigtype(), rpmtsSolve(), rpmtsSpec(), rpmtsStashKeyid(), rpmtsUnorderedSuccessors(), rpmtsUpdateDSI(), rpmtsVerifyDB(), rpmtsVSFlags(), rpmVerifyFile(), rpmVerifyScript(), rpmVerifySignature(), rpmVerifySignatures(), runImmedTriggers(), runScript(), runTriggers(), showQueryPackage(), showVerifyPackage(), skipFiles(), unsatisfiedDepend(), verifyDependencies(), verifyGPGSignature(), verifyHeader(), verifyMD5Signature(), verifyPGPSignature(), verifySHA1Signature(), verifySizeSignature(), XrpmtsiInit(), XrpmtsLink(), and XrpmtsUnlink().


Enumeration Type Documentation

enum fileAction_e
 

File disposition(s) during package install/erase transaction.

Enumeration values:
FA_UNKNOWN  initial action for file ...
FA_CREATE  ... copy in from payload.
FA_COPYIN  ... copy in from payload.
FA_COPYOUT  ... copy out to payload.
FA_BACKUP  ... renamed with ".rpmorig" extension.
FA_SAVE  ... renamed with ".rpmsave" extension.
FA_SKIP  ... already replaced, don't remove.
FA_ALTNAME  ... create with ".rpmnew" extension.
FA_ERASE  ... to be removed.
FA_SKIPNSTATE  ... untouched, state "not installed".
FA_SKIPNETSHARED  ... untouched, state "netshared".
FA_SKIPCOLOR  ... untouched, state "wrong color".

Definition at line 798 of file rpmlib.h.

enum fileTypes_e
 

File types.

These are the file types used internally by rpm. The file type is determined by applying stat(2) macros like S_ISDIR to the file mode tag from a header. The values are arbitrary, but are identical to the linux stat(2) file types.

Enumeration values:
PIPE  pipe/fifo
CDEV  character device
XDIR  directory
BDEV  block device
REG  regular file
LINK  hard link
SOCK  socket

Definition at line 823 of file rpmlib.h.

enum rpmfileAttrs_e
 

File Attributes.

Enumeration values:
RPMFILE_NONE 
RPMFILE_CONFIG  from %config
RPMFILE_DOC  from %doc
RPMFILE_ICON  from %donotuse.
RPMFILE_MISSINGOK  from %config(missingok)
RPMFILE_NOREPLACE  from %config(noreplace)
RPMFILE_SPECFILE 
Todo:
(unnecessary) marks 1st file in srpm.
RPMFILE_GHOST  from %ghost
RPMFILE_LICENSE  from %license
RPMFILE_README  from %readme
RPMFILE_EXCLUDE  from %exclude
RPMFILE_UNPATCHED  placeholder (SuSE)
RPMFILE_PUBKEY  from %pubkey

Definition at line 439 of file rpmlib.h.

enum rpmfileState_e
 

File States (when installed).

Enumeration values:
RPMFILE_STATE_NORMAL 
RPMFILE_STATE_REPLACED 
RPMFILE_STATE_NOTINSTALLED 
RPMFILE_STATE_NETSHARED 
RPMFILE_STATE_WRONGCOLOR 

Definition at line 427 of file rpmlib.h.

enum rpmprobFilterFlags_e
 

Todo:
Generalize filter mechanism.
Enumeration values:
RPMPROB_FILTER_NONE 
RPMPROB_FILTER_IGNOREOS  from --ignoreos
RPMPROB_FILTER_IGNOREARCH  from --ignorearch
RPMPROB_FILTER_REPLACEPKG  from --replacepkgs
RPMPROB_FILTER_FORCERELOCATE  from --badreloc
RPMPROB_FILTER_REPLACENEWFILES  from --replacefiles
RPMPROB_FILTER_REPLACEOLDFILES  from --replacefiles
RPMPROB_FILTER_OLDPACKAGE  from --oldpackage
RPMPROB_FILTER_DISKSPACE  from --ignoresize
RPMPROB_FILTER_DISKNODES  from --ignoresize

Definition at line 763 of file rpmlib.h.

enum rpmRC_e
 

Package read return codes.

Enumeration values:
RPMRC_OK  Generic success code
RPMRC_NOTFOUND  Generic not found code.
RPMRC_FAIL  Generic failure code.
RPMRC_NOTTRUSTED  Signature is OK, but key is not trusted.
RPMRC_NOKEY  Public key is unavailable.

Definition at line 20 of file rpmlib.h.

enum rpmsenseFlags_e
 

Dependency Attributes.

Enumeration values:
RPMSENSE_ANY 
RPMSENSE_SERIAL 
Todo:
Legacy.
RPMSENSE_LESS 
RPMSENSE_GREATER 
RPMSENSE_EQUAL 
RPMSENSE_PROVIDES 
RPMSENSE_CONFLICTS 
RPMSENSE_PREREQ 
Todo:
Legacy.
RPMSENSE_OBSOLETES 
RPMSENSE_INTERP  Interpreter used by scriptlet.
RPMSENSE_SCRIPT_PRE  pre dependency.
RPMSENSE_SCRIPT_POST  post dependency.
RPMSENSE_SCRIPT_PREUN  preun dependency.
RPMSENSE_SCRIPT_POSTUN  postun dependency.
RPMSENSE_SCRIPT_VERIFY  verify dependency.
RPMSENSE_FIND_REQUIRES  find-requires generated dependency.
RPMSENSE_FIND_PROVIDES  find-provides generated dependency.
RPMSENSE_TRIGGERIN  triggerin dependency.
RPMSENSE_TRIGGERUN  triggerun dependency.
RPMSENSE_TRIGGERPOSTUN  triggerpostun dependency.
RPMSENSE_SCRIPT_PREP  prep build dependency.
RPMSENSE_SCRIPT_BUILD  build build dependency.
RPMSENSE_SCRIPT_INSTALL  install build dependency.
RPMSENSE_SCRIPT_CLEAN  clean build dependency.
RPMSENSE_RPMLIB  rpmlib(feature) dependency.
RPMSENSE_TRIGGERPREIN 
Todo:
Implement triggerprein.
RPMSENSE_KEYRING 
RPMSENSE_PATCHES 
RPMSENSE_CONFIG 

Definition at line 462 of file rpmlib.h.

enum rpmTag_e
 

Tags identify data in package headers.

Note:
tags should not have value 0!
Enumeration values:
RPMTAG_HEADERIMAGE  Current image.
RPMTAG_HEADERSIGNATURES  Signatures.
RPMTAG_HEADERIMMUTABLE  Original image.
RPMTAG_HEADERREGIONS  Regions.
RPMTAG_HEADERI18NTABLE  I18N string locales.
RPMTAG_SIG_BASE 
RPMTAG_SIGSIZE 
RPMTAG_SIGLEMD5_1  internal - obsolete
RPMTAG_SIGPGP 
RPMTAG_SIGLEMD5_2  internal - obsolete
RPMTAG_SIGMD5 
RPMTAG_SIGGPG 
RPMTAG_SIGPGP5  internal - obsolete
RPMTAG_BADSHA1_1  internal - obsolete
RPMTAG_BADSHA1_2  internal - obsolete
RPMTAG_PUBKEYS 
RPMTAG_DSAHEADER 
RPMTAG_RSAHEADER 
RPMTAG_SHA1HEADER 
RPMTAG_NAME 
RPMTAG_VERSION 
RPMTAG_RELEASE 
RPMTAG_EPOCH 
RPMTAG_SUMMARY 
RPMTAG_DESCRIPTION 
RPMTAG_BUILDTIME 
RPMTAG_BUILDHOST 
RPMTAG_INSTALLTIME 
RPMTAG_SIZE 
RPMTAG_DISTRIBUTION 
RPMTAG_VENDOR 
RPMTAG_GIF 
RPMTAG_XPM 
RPMTAG_LICENSE 
RPMTAG_PACKAGER 
RPMTAG_GROUP 
RPMTAG_CHANGELOG  internal
RPMTAG_SOURCE 
RPMTAG_PATCH 
RPMTAG_URL 
RPMTAG_OS 
RPMTAG_ARCH 
RPMTAG_PREIN 
RPMTAG_POSTIN 
RPMTAG_PREUN 
RPMTAG_POSTUN 
RPMTAG_OLDFILENAMES 
RPMTAG_FILESIZES 
RPMTAG_FILESTATES 
RPMTAG_FILEMODES 
RPMTAG_FILEUIDS  internal
RPMTAG_FILEGIDS  internal
RPMTAG_FILERDEVS 
RPMTAG_FILEMTIMES 
RPMTAG_FILEMD5S 
RPMTAG_FILELINKTOS 
RPMTAG_FILEFLAGS 
RPMTAG_ROOT  internal - obsolete
RPMTAG_FILEUSERNAME 
RPMTAG_FILEGROUPNAME 
RPMTAG_EXCLUDE  internal - obsolete
RPMTAG_EXCLUSIVE  internal - obsolete
RPMTAG_ICON 
RPMTAG_SOURCERPM 
RPMTAG_FILEVERIFYFLAGS 
RPMTAG_ARCHIVESIZE 
RPMTAG_PROVIDENAME 
RPMTAG_REQUIREFLAGS 
RPMTAG_REQUIRENAME 
RPMTAG_REQUIREVERSION 
RPMTAG_NOSOURCE  internal
RPMTAG_NOPATCH  internal
RPMTAG_CONFLICTFLAGS 
RPMTAG_CONFLICTNAME 
RPMTAG_CONFLICTVERSION 
RPMTAG_DEFAULTPREFIX  internal - deprecated
RPMTAG_BUILDROOT  internal
RPMTAG_INSTALLPREFIX  internal - deprecated
RPMTAG_EXCLUDEARCH 
RPMTAG_EXCLUDEOS 
RPMTAG_EXCLUSIVEARCH 
RPMTAG_EXCLUSIVEOS 
RPMTAG_AUTOREQPROV  internal
RPMTAG_RPMVERSION 
RPMTAG_TRIGGERSCRIPTS 
RPMTAG_TRIGGERNAME 
RPMTAG_TRIGGERVERSION 
RPMTAG_TRIGGERFLAGS 
RPMTAG_TRIGGERINDEX 
RPMTAG_VERIFYSCRIPT 
RPMTAG_CHANGELOGTIME 
RPMTAG_CHANGELOGNAME 
RPMTAG_CHANGELOGTEXT 
RPMTAG_BROKENMD5  internal - obsolete
RPMTAG_PREREQ  internal
RPMTAG_PREINPROG 
RPMTAG_POSTINPROG 
RPMTAG_PREUNPROG 
RPMTAG_POSTUNPROG 
RPMTAG_BUILDARCHS 
RPMTAG_OBSOLETENAME 
RPMTAG_VERIFYSCRIPTPROG 
RPMTAG_TRIGGERSCRIPTPROG 
RPMTAG_DOCDIR  internal
RPMTAG_COOKIE 
RPMTAG_FILEDEVICES 
RPMTAG_FILEINODES 
RPMTAG_FILELANGS 
RPMTAG_PREFIXES 
RPMTAG_INSTPREFIXES 
RPMTAG_TRIGGERIN  internal
RPMTAG_TRIGGERUN  internal
RPMTAG_TRIGGERPOSTUN  internal
RPMTAG_AUTOREQ  internal
RPMTAG_AUTOPROV  internal
RPMTAG_CAPABILITY  internal - obsolete
RPMTAG_SOURCEPACKAGE  src.rpm header marker
RPMTAG_OLDORIGFILENAMES  internal - obsolete
RPMTAG_BUILDPREREQ  internal
RPMTAG_BUILDREQUIRES  internal
RPMTAG_BUILDCONFLICTS  internal
RPMTAG_BUILDMACROS  internal - unused
RPMTAG_PROVIDEFLAGS 
RPMTAG_PROVIDEVERSION 
RPMTAG_OBSOLETEFLAGS 
RPMTAG_OBSOLETEVERSION 
RPMTAG_DIRINDEXES 
RPMTAG_BASENAMES 
RPMTAG_DIRNAMES 
RPMTAG_ORIGDIRINDEXES  internal
RPMTAG_ORIGBASENAMES  internal
RPMTAG_ORIGDIRNAMES  internal
RPMTAG_OPTFLAGS 
RPMTAG_DISTURL 
RPMTAG_PAYLOADFORMAT 
RPMTAG_PAYLOADCOMPRESSOR 
RPMTAG_PAYLOADFLAGS 
RPMTAG_INSTALLCOLOR  transaction color when installed
RPMTAG_INSTALLTID 
RPMTAG_REMOVETID 
RPMTAG_SHA1RHN  internal - obsolete
RPMTAG_RHNPLATFORM 
RPMTAG_PLATFORM 
RPMTAG_PATCHESNAME  placeholder (SuSE)
RPMTAG_PATCHESFLAGS  placeholder (SuSE)
RPMTAG_PATCHESVERSION  placeholder (SuSE)
RPMTAG_CACHECTIME 
RPMTAG_CACHEPKGPATH 
RPMTAG_CACHEPKGSIZE 
RPMTAG_CACHEPKGMTIME 
RPMTAG_FILECOLORS 
RPMTAG_FILECLASS 
RPMTAG_CLASSDICT 
RPMTAG_FILEDEPENDSX 
RPMTAG_FILEDEPENDSN 
RPMTAG_DEPENDSDICT 
RPMTAG_SOURCEPKGID 
RPMTAG_FIRSTFREE_TAG  internal

Definition at line 223 of file rpmlib.h.

enum rpmtransFlags_e
 

Bit(s) to control rpmtsRun() operation.

Enumeration values:
RPMTRANS_FLAG_NONE 
RPMTRANS_FLAG_TEST  from --test
RPMTRANS_FLAG_BUILD_PROBS  don't process payload
RPMTRANS_FLAG_NOSCRIPTS  from --noscripts
RPMTRANS_FLAG_JUSTDB  from --justdb
RPMTRANS_FLAG_NOTRIGGERS  from --notriggers
RPMTRANS_FLAG_NODOCS  from --excludedocs
RPMTRANS_FLAG_ALLFILES  from --allfiles
RPMTRANS_FLAG_KEEPOBSOLETE 
Todo:
Document.
RPMTRANS_FLAG_DIRSTASH  from --dirstash
RPMTRANS_FLAG_REPACKAGE  from --repackage
RPMTRANS_FLAG_PKGCOMMIT 
RPMTRANS_FLAG_PKGUNDO 
RPMTRANS_FLAG_COMMIT 
RPMTRANS_FLAG_UNDO 
RPMTRANS_FLAG_REVERSE 
RPMTRANS_FLAG_NOTRIGGERPREIN  from --notriggerprein
RPMTRANS_FLAG_NOPRE  from --nopre
RPMTRANS_FLAG_NOPOST  from --nopost
RPMTRANS_FLAG_NOTRIGGERIN  from --notriggerin
RPMTRANS_FLAG_NOTRIGGERUN  from --notriggerun
RPMTRANS_FLAG_NOPREUN  from --nopreun
RPMTRANS_FLAG_NOPOSTUN  from --nopostun
RPMTRANS_FLAG_NOTRIGGERPOSTUN  from --notriggerpostun
RPMTRANS_FLAG_NOPAYLOAD 
RPMTRANS_FLAG_APPLYONLY 
RPMTRANS_FLAG_ANACONDA 
RPMTRANS_FLAG_NOMD5  from --nomd5
RPMTRANS_FLAG_NOSUGGEST  from --nosuggest
RPMTRANS_FLAG_ADDINDEPS  from --aid
RPMTRANS_FLAG_NOCONFIGS  from --noconfigs

Definition at line 925 of file rpmlib.h.


Function Documentation

void* _free const void *    p [inline, static]
 

Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.

Parameters:
p  memory to free
Returns:
NULL always

Definition at line 58 of file rpmlib.h.

void freeFilesystems void   
 

Release storage used by file system usage cache.

Definition at line 28 of file fs.c.

References _free(), fsnames, fsinfo::mntPoint, and numFilesystems.

Referenced by getFilesystemList(), and main().

rpmRC headerCheck rpmts    ts,
const void *    uh,
size_t    uc,
const char **    msg
 

Check header consistency, performing headerGetEntry() the hard way.

Sanity checks on the header are performed while looking for a header-only digest or signature to verify the blob. If found, the digest or signature is verified.

Parameters:
ts  transaction set
uh  unloaded header blob
uc  no. of bytes in blob (or 0 to disable)
Return values:
msg  signature verification msg
Returns:
RPMRC_OK/RPMRC_NOTFOUND/RPMRC_FAIL

Definition at line 325 of file package.c.

References _, _free(), _print_pkts, alloca(), entryInfo_s::count, pgpDig_s::hdrsha1ctx, header_magic, headerVerifyInfo(), indexEntry_s::info, int_32, pgpDig_s::nbytes, entryInfo_s::offset, PGPHASHALGO_MD5, PGPHASHALGO_SHA1, pgpPrtPkts(), REGION_TAG_COUNT, RPM_BIN_TYPE, RPM_STRING_TYPE, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmIsDebug, RPMMESS_WARNING, rpmMessage, rpmRC, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, RPMTAG_DSAHEADER, RPMTAG_HEADERIMMUTABLE, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, rpmts, rpmtsCleanDig(), rpmtsDig(), rpmtsSetSig(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NODSAHEADER, RPMVSF_NOSHA1HEADER, rpmVSFlags, pgpDig_s::signature, snprintf(), entryInfo_s::tag, entryInfo_s::type, pgpDigParams_s::version, xmalloc(), and xstrdup().

Referenced by rpmReadHeader(), and rpmts_HdrCheck().

void headerMergeLegacySigs Header    h,
const Header    sigh
 

Translate and merge legacy signature tags into header.

Todo:
Remove headerSort() through headerInitIterator() modifies sig.
Parameters:
h  header
sigh  signature header

Definition at line 98 of file package.c.

References HAE_t, hdrchkData, hdrchkType, HEADER_SIGBASE, HEADER_TAGBASE, headerFreeIterator(), headerInitIterator(), headerIsEntry(), headerNextIterator(), HFD_t, int_32, RPM_BIN_TYPE, RPM_CHAR_TYPE, RPM_I18NSTRING_TYPE, RPM_INT16_TYPE, RPM_INT32_TYPE, RPM_INT8_TYPE, RPM_NULL_TYPE, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_SIGGPG, RPMTAG_SIGLEMD5_1, RPMTAG_SIGLEMD5_2, RPMTAG_SIGMD5, RPMTAG_SIGPGP, RPMTAG_SIGPGP5, and RPMTAG_SIGSIZE.

Referenced by rpmReadPackageFile(), and writeRPM().

Header headerRegenSigHeader const Header    h,
int    noArchiveSize
 

Regenerate signature header.

Todo:
Remove headerSort() through headerInitIterator() modifies h.
Parameters:
h  header
noArchiveSize  don't copy archive size tag (pre rpm-4.1)
Returns:
regenerated signature header

Definition at line 178 of file package.c.

References HEADER_SIGBASE, HEADER_TAGBASE, headerAddEntry(), headerFreeIterator(), headerInitIterator(), headerIsEntry(), headerNextIterator(), HFD_t, int_32, rpmNewSignature(), RPMSIGTAG_GPG, RPMSIGTAG_LEMD5_1, RPMSIGTAG_LEMD5_2, RPMSIGTAG_MD5, RPMSIGTAG_PAYLOADSIZE, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_SIZE, RPMTAG_ARCHIVESIZE, RPMTAG_DSAHEADER, RPMTAG_RSAHEADER, RPMTAG_SHA1HEADER, RPMTAG_SIGGPG, RPMTAG_SIGLEMD5_1, RPMTAG_SIGLEMD5_2, RPMTAG_SIGMD5, RPMTAG_SIGPGP, RPMTAG_SIGPGP5, and RPMTAG_SIGSIZE.

Referenced by rpmpsmStage().

int headerVerifyInfo int    il,
int    dl,
const void *    pev,
void *    iv,
int    negate
 

Perform simple sanity and range checks on header tag(s).

Parameters:
il  no. of tags in header
dl  no. of bytes in header data.
pev  1st element in tag array, big-endian
iv  failing (or last) tag element, host-endian
negate  negative offset expected?
Returns:
-1 on success, otherwise failing tag element index

Definition at line 281 of file package.c.

References entryInfo_s::count, hdrchkAlign, hdrchkData, hdrchkRange, hdrchkType, entryInfo_s::offset, entryInfo_s::tag, and entryInfo_s::type.

Referenced by headerCheck(), and rpmReadSignature().

int rpmCheckRpmlibProvides const rpmds    key
 

Check dependency against internal rpmlib feature provides.

Parameters:
key  dependency
Returns:
1 if dependency overlaps, 0 otherwise

Definition at line 77 of file rpmlibprov.c.

References rpmlibProvides_s::featureEVR, rpmlibProvides_s::featureFlags, rpmlibProvides_s::featureName, rpmds, rpmdsCompare(), rpmdsFree(), rpmdsSingle(), and RPMTAG_PROVIDENAME.

Referenced by unsatisfiedDepend().

int rpmGetFilesystemList const char ***    listptr,
int *    num
 

Return (cached) file system mount points.

Return values:
listptr  addess of file system names (or NULL)
num  address of number of file systems (or NULL)
Returns:
0 on success, 1 on error

Definition at line 248 of file fs.c.

References fsnames, getFilesystemList(), and numFilesystems.

Referenced by fsnamesTag(), fssizesTag(), and rpmtsInitDSI().

int rpmGetFilesystemUsage const char **    fileList,
int_32   fssizes,
int    numFiles,
uint_32 **    usagesPtr,
int    flags
 

Determine per-file system usage for a list of files.

Parameters:
fileList  array of absolute file names
fssizes  array of file sizes
numFiles  number of files in list
Return values:
usagesPtr  address of per-file system usage array (or NULL)
Parameters:
flags  (unused)
Returns:
0 on success, 1 on error

Definition at line 262 of file fs.c.

References _, _free(), alloca(), fsinfo::dev, errno, fsnames, getFilesystemList(), int_32, numFilesystems, RPMERR_BADDEV, RPMERR_STAT, rpmError, rpmGetPath(), strerror(), uint_32, and xcalloc().

Referenced by fssizesTag().

int rpmGetRpmlibProvides const char ***    provNames,
int **    provFlags,
const char ***    provVersions
 

Return copy of rpmlib internal provides.

Return values:
provNames  address of array of rpmlib internal provide names
provFlags  address of array of rpmlib internal provide flags
provVersions  address of array of rpmlib internal provide versions
Returns:
no. of entries

Definition at line 96 of file rpmlibprov.c.

References _free(), rpmlibProvides_s::featureEVR, rpmlibProvides_s::featureFlags, rpmlibProvides_s::featureName, and xcalloc().

int rpmHeaderGetEntry Header    h,
int_32    tag,
int_32   type,
void **    p,
int_32   c
 

Retrieve tag info from header. This is a "dressed" entry to headerGetEntry to do: 1) DIRNAME/BASENAME/DIRINDICES -> FILENAMES tag conversions. 2) i18n lookaside (if enabled).

Parameters:
h  header
tag  tag
Return values:
type  address of tag value data type
p  address of pointer to tag value(s)
c  address of number of values
Returns:
0 on success, 1 on bad magic, 2 on error

Definition at line 398 of file misc.c.

References headerGetEntry(), headerSprintf(), int_32, RPM_STRING_ARRAY_TYPE, RPM_STRING_TYPE, rpmfiBuildFNames(), RPMTAG_BASENAMES, RPMTAG_DESCRIPTION, RPMTAG_GROUP, RPMTAG_OLDFILENAMES, RPMTAG_SUMMARY, stpcpy(), and tagName().

Referenced by hdr_subscript().

rpmRC rpmInstallSourcePackage rpmts    ts,
FD_t    fd,
const char **    specFilePtr,
const char **    cookie
 

Install source package.

Parameters:
ts  transaction set
fd  file handle
Return values:
specFilePtr  address of spec file name (or NULL)
cookie  address of cookie pointer (or NULL)
Returns:
rpmRC return code

Definition at line 232 of file psm.c.

References _, _free(), CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, FA_CREATE, Fclose(), fdLink, headerFree(), headerIsEntry(), headerLink(), HFD_t, HGE_t, PSM_FINI, PSM_PKGINSTALL, PSM_PROCESS, RPMERR_NOSPEC, RPMERR_NOTSRPM, rpmError, rpmfi, rpmfiBuildFNames(), rpmfiFree(), RPMFILE_SPECFILE, rpmfiLink, rpmfiNew(), rpmGenPath(), rpmInstallLoadMacros(), rpmMkdirPath(), rpmpsmStage(), rpmRC, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_BASENAMES, RPMTAG_COOKIE, RPMTAG_SOURCEPACKAGE, rpmts, rpmtsAddInstallElement(), rpmtsClean(), rpmtsElement(), rpmtsFree(), rpmtsLink, rpmtsRootDir(), stpcpy(), xcalloc(), xmalloc(), and xstrdup().

Referenced by rpmInstall().

rpmRC rpmReadHeader rpmts    ts,
FD_t    fd,
Header   hdrp,
const char **    msg
 

Return checked and loaded header.

Parameters:
ts  transaction set
fd  file handle
Return values:
hdrp  address of header (or NULL)
msg  verification error message (or NULL)
Returns:
RPMRC_OK on success

Definition at line 632 of file package.c.

References _, _free(), headerToken_s::flags, hdrchkData, hdrchkTags, header_magic, headerCheck(), HEADERFLAG_ALLOCATED, headerFree(), headerLink(), headerLoad(), int_32, rpmRC, RPMRC_FAIL, RPMRC_OK, rpmts, snprintf(), timedRead, xmalloc(), and xstrdup().

Referenced by rpmReadPackageFile().

int rpmReadPackageFile rpmts    ts,
FD_t    fd,
const char *    fn,
Header   hdrp
 

Return package header from file handle, verifying digests/signatures.

Parameters:
ts  transaction set
fd  file handle
fn  file name
Return values:
hdrp  address of header (or NULL)
Returns:
0 on success

Definition at line 730 of file package.c.

References _, _free(), _print_pkts, alloca(), byte, _FD_s::digests, fdInitDigest(), Fileno(), Fread(), Fstrerror(), _FDDIGEST_s::hashalgo, _FDDIGEST_s::hashctx, pgpDig_s::hdrsha1ctx, header_magic, HEADER_MAGIC_NO, HEADER_MAGIC_YES, headerFree(), headerFreeData(), headerGetEntry(), headerIsEntry(), headerLink(), headerMergeLegacySigs(), headerSizeof(), int_32, legacyRetrofit(), rpmlead::major, pgpDig_s::md5ctx, pgpDig_s::nbytes, _FD_s::ndigests, PGPHASHALGO_MD5, PGPHASHALGO_SHA1, pgpPrtPkts(), readLead(), RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), RPMERR_FREAD, RPMERR_NEWPACKAGE, RPMERR_SIGGEN, rpmError, rpmFreeSignature(), rpmIsDebug, RPMMESS_DEBUG, RPMMESS_ERROR, RPMMESS_WARNING, rpmMessage, rpmRC, RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTFOUND, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadHeader(), rpmReadSignature(), RPMSIGTAG_DSA, RPMSIGTAG_GPG, RPMSIGTAG_MD5, RPMSIGTAG_PGP, RPMSIGTAG_PGP5, RPMSIGTAG_RSA, RPMSIGTAG_SHA1, RPMTAG_HEADERIMMUTABLE, rpmts, rpmtsCleanDig(), rpmtsDig(), rpmtsSetSig(), rpmtsStashKeyid(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NEEDPAYLOAD, RPMVSF_NODSA, RPMVSF_NODSAHEADER, RPMVSF_NOMD5, RPMVSF_NORSA, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, rpmVSFlags, pgpDig_s::sha1ctx, pgpDig_s::signature, rpmlead::signature_type, and pgpDigParams_s::version.

Referenced by ftsStashLatest(), IDTXglob(), main(), readRPM(), rpmGraph(), rpmInstall(), rpmInstallSourcePackage(), rpmQueryVerify(), rpmts_HdrFromFdno(), rpmtsRun(), and rpmtsSolve().

int rpmvercmp const char *    a,
const char *    b
 

Segmented string compare for version and/or release.

Parameters:
a  1st string
b  2nd string
Returns:
+1 if a is "newer", 0 if equal, -1 if b is "newer"

Definition at line 15 of file rpmvercmp.c.

References alloca(), xisalnum(), xisalpha(), and xisdigit().

Referenced by labelCompare(), rpmdsCompare(), and rpmVersionCompare().

int rpmVersionCompare Header    first,
Header    second
 

Compare headers to determine which header is "newer".

Parameters:
first  1st header
second  2nd header
Returns:
result of comparison

Definition at line 50 of file psm.c.

References headerGetEntry(), int_32, RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, and rpmvercmp().

Referenced by hdr_compare(), rpmInstall(), and rpmtsAddInstallElement().

const char *const tagName int    tag
 

Return name of tag from value.

Parameters:
tag  tag value
Returns:
name of tag

Definition at line 10 of file tagname.c.

int tagValue const char *    tagstr
 

Return value of tag from name.

Parameters:
tagstr  name of tag
Returns:
tag value

Definition at line 55 of file tagname.c.

References headerTagTableEntry_s::name, RPMDBI_ADDED, RPMDBI_AVAILABLE, RPMDBI_DEPENDS, RPMDBI_PACKAGES, RPMDBI_REMOVED, headerTagTableEntry_s::val, and xstrcasecmp().

Referenced by dbiTagsInit(), and rpmQueryVerify().


Variable Documentation

struct MacroContext_s* rpmCLIMacroContext
 

Definition at line 33 of file rpmlib.h.

const char* rpmEVR
 

Definition at line 42 of file rpmlib.h.

int rpmFLAGS
 

Definition at line 45 of file rpmlib.h.

struct MacroContext_s* rpmGlobalMacroContext
 

Definition at line 30 of file rpmlib.h.

const struct headerSprintfExtension_s rpmHeaderFormats[]
 

Table of query format extensions.

Note:
Chains to headerDefaultFormats[].

Definition at line 206 of file rpmlib.h.

const char* rpmNAME
 

Definition at line 39 of file rpmlib.h.

const struct headerTagTableEntry_s* rpmTagTable
 

Automatically generated table of tag name/value pairs.

Definition at line 189 of file rpmlib.h.

const int rpmTagTableSize
 

Number of entries in rpmTagTable.

Definition at line 197 of file rpmlib.h.

const char* RPMVERSION
 

Definition at line 36 of file rpmlib.h.


Generated on Sun Oct 26 13:02:05 2003 for rpm by doxygen1.2.18