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  rpmRelocation_s
 We pass these around as an array with a sentinel. More...
struct  rpmlead
 The lead data structure. More...

Defines

#define RPMAL_NOMATCH   ((alKey)-1L)
#define RPMDBI_PACKAGES   0
 Pseudo-tags used by the rpmdb and rpmgi iterator API's.
#define RPMDBI_DEPENDS   1
#define RPMDBI_LABEL   2
#define RPMDBI_ADDED   3
#define RPMDBI_REMOVED   4
#define RPMDBI_AVAILABLE   5
#define RPMDBI_HDLIST   6
#define RPMDBI_ARGLIST   7
#define RPMDBI_FTSWALK   8
#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_P   RPMTAG_PROVIDENAME
#define RPMTAG_REQUIRES   RPMTAG_REQUIRENAME
#define RPMTAG_D   RPMTAG_REQUIRENAME
#define RPMTAG_CONFLICTS   RPMTAG_CONFLICTNAME
#define RPMTAG_C   RPMTAG_CONFLICTNAME
#define RPMTAG_OBSOLETES   RPMTAG_OBSOLETENAME
#define RPMTAG_O   RPMTAG_OBSOLETENAME
#define RPMTAG_SVNID   RPMTAG_CVSID
#define RPMTAG_EXTERNAL_TAG   1000000
#define RPMFILE_STATE_MISSING   -1
#define RPMFILE_ALL   ~(RPMFILE_NONE)
#define RPMSENSE_SENSEMASK   15
#define RPMSENSE_TRIGGER   (RPMSENSE_TRIGGERPREIN | 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) == (1<<6))
#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 struct rpmts_srpmts
 The RPM Transaction Set.
typedef struct Spec_sSpec
typedef void * alKey
 An added/available package retrieval key.
typedef int alNum
 An added/available package retrieval index.
typedef struct rpmds_srpmds
 Dependency tag sets from a header, so that a header can be discarded early.
typedef struct rpmfi_srpmfi
 File info tag sets from a header, so that a header can be discarded early.
typedef struct rpmte_srpmte
 An element of a transaction set, i.e.
typedef struct rpmdb_srpmdb
 Database of headers and tag value indices.
typedef struct
_rpmdbMatchIterator
rpmdbMatchIterator
 Database iterator.
typedef struct rpmgi_srpmgi
 Generalized iterator.
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
}
 

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), RPMFILE_POLICY = (1 << 12)
}
 

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_MISSINGOK = (1 << 19), 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

static 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)
 Return name, version, release strings from header.
int headerNEVRA (Header h, const char **np, const char **ep, const char **vp, const char **rp, const char **ap)
 Return name, epoch, version, release, arch strings from header.
void headerMergeLegacySigs (Header h, const Header sigh)
 Translate and merge legacy signature tags into header.
Header headerRegenSigHeader (const Header h, int noArchiveSize)
 Regenerate signature header.
int rpmHeaderGetEntry (Header h, int_32 tag, int_32 *type, void **p, int_32 *c)
 Retrieve tag info from header.
int tagType (int tag)
 Return tag data type from value.
const char *const tagName (int tag)
 Return tag name from value.
int tagValue (const char *tagstr)
 Return tag value 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

struct MacroContext_srpmGlobalMacroContext
struct MacroContext_srpmCLIMacroContext
const char * RPMVERSION
const char * rpmNAME
const char * rpmEVR
int rpmFLAGS
struct headerTagTableEntry_srpmTagTable
 Automatically generated table of tag name/value pairs.
const int rpmTagTableSize
 Number of entries in rpmTagTable.
struct headerSprintfExtension_s rpmHeaderFormats []
 Table of query format extensions.

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 }
 

Build and install arch/os table identifiers.

More...
const char * rpmGetVar (int var)
 Return value of an rpmrc variable.
void rpmSetVar (int var, const char *val)
 Set value of an rpmrc variable.
int rpmReadConfigFiles (const char *file, const char *target)
 Read macro configuration file(s) for a target.
void rpmGetArchInfo (const char **name, int *num)
 Return current arch name and/or number.
void rpmGetOsInfo (const char **name, int *num)
 Return current os name and/or number.
int rpmMachineScore (int type, const char *name)
 Return arch/os score of a name.
int rpmShowRC (FILE *fp)
 Display current rpmrc (and macro) configuration.
void rpmSetTables (int archTable, int osTable)
void rpmSetMachine (const char *arch, const char *os)
 Set current arch/os names.
void rpmGetMachine (const char **arch, const char **os)
 Return current arch/os names.
void rpmFreeRpmrc (void)
 Destroy rpmrc arch/os compatibility tables.

RPMTS



#define XFA_SKIPPING(_a)   ((_a) == FA_SKIP || (_a) == FA_SKIPNSTATE || (_a) == FA_SKIPNETSHARED || (_a) == FA_SKIPCOLOR)
#define _noTransScripts
#define _noTransTriggers
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_NOCONTEXTS = (1 << 8), 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),
  RPMTRANS_FLAG_DEPLOOPS = (1 << 31)
}
 

Bit(s) to control rpmtsRun() operation.

More...
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 struct 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 struct fsmIterator_sFSMI_t
 Iterator across package file info, forward on install, backward on erase.
typedef struct fsm_sFSM_t
 File state machine data.
typedef struct rpmpsm_srpmpsm
 Package state machine data.
typedef enum rpmtransFlags_e rpmtransFlags
 Bit(s) to control rpmtsRun() operation.
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 headerCheckPayloadFormat (Header h)
 Check for supported payload format in header.
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.
rpmRC 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)
 Return copy of rpmlib internal provides.
int rpmvercmp (const char *a, const char *b)
 Segmented string compare for version and/or release.
int rpmCheckRpmlibProvides (const rpmds key)
 Check dependency against internal rpmlib feature provides.
void rpmShowRpmlibProvides (FILE *fp)
 Display current rpmlib feature provides.

RPMEIU



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)
}
 

Bit(s) to control rpmInstall() operation.

More...
enum  rpmEraseInterfaceFlags_e { UNINSTALL_NONE = 0, UNINSTALL_NODEPS = (1 << 0), UNINSTALL_ALLMATCHES = (1 << 1) }
 

Bit(s) to control rpmErase() operation.

More...
typedef enum
rpmInstallInterfaceFlags_e 
rpmInstallInterfaceFlags
 Bit(s) to control rpmInstall() operation.
typedef enum
rpmEraseInterfaceFlags_e 
rpmEraseInterfaceFlags
 Bit(s) to control rpmErase() operation.

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
}
 

Tags found in signature header from package.

More...
rpmRC rpmVerifySignature (const rpmts ts, char *result)
 Verify a signature from a package.
Header rpmFreeSignature (Header h)
 Destroy signature header from package.

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
#define _ERASE_ONLY_MASK   _notpre(RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN)

Definition at line 560 of file rpmlib.h.

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

Definition at line 558 of file rpmlib.h.

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

Definition at line 557 of file rpmlib.h.

Referenced by identifyDepend().

#define _noTransScripts
#define _noTransTriggers
#define isErasePreReq ( _x   )     ((_x) & _ERASE_ONLY_MASK)

Definition at line 565 of file rpmlib.h.

Referenced by rpmtsOrder(), and zapRelation().

#define isInstallPreReq ( _x   )     ((_x) & _INSTALL_ONLY_MASK)

Definition at line 564 of file rpmlib.h.

Referenced by rpmdbAdd(), rpmtsOrder(), and zapRelation().

#define isLegacyPreReq ( _x   )     (((_x) & _ALL_REQUIRES_MASK) == (1<<6))

Definition at line 563 of file rpmlib.h.

Referenced by identifyDepend(), and rpmtsOrder().

#define RPM_MACHTABLE_COUNT   4

No. of arch/os tables.

Definition at line 608 of file rpmlib.h.

Referenced by doReadRC(), and rpmFreeRpmrc().

#define RPMAL_NOMATCH   ((alKey)-1L)
#define RPMDBI_ADDED   3

Definition at line 220 of file rpmlib.h.

Referenced by isTemporaryDB(), rpmgiNext(), tagName(), and tagValue().

#define RPMDBI_ARGLIST   7

Definition at line 224 of file rpmlib.h.

Referenced by rpmcliArgIter(), rpmgiGlobArgv(), rpmgiNext(), tagName(), and tagValue().

#define RPMDBI_AVAILABLE   5

Definition at line 222 of file rpmlib.h.

Referenced by isTemporaryDB(), tagName(), and tagValue().

#define RPMDBI_DEPENDS   1

Definition at line 218 of file rpmlib.h.

Referenced by isTemporaryDB(), rpmtsCheck(), tagName(), tagValue(), and unsatisfiedDepend().

#define RPMDBI_FTSWALK   8

Definition at line 225 of file rpmlib.h.

Referenced by rpmcliArgIter(), rpmgiGlobArgv(), rpmgiNext(), tagName(), and tagValue().

#define RPMDBI_HDLIST   6

Definition at line 223 of file rpmlib.h.

Referenced by rpmcliArgIter(), rpmgiGlobArgv(), rpmgiNext(), tagName(), and tagValue().

#define RPMDBI_LABEL   2
#define RPMDBI_PACKAGES   0
#define RPMDBI_REMOVED   4

Definition at line 221 of file rpmlib.h.

Referenced by isTemporaryDB(), tagName(), and tagValue().

#define RPMFILE_ALL   ~(RPMFILE_NONE)

Definition at line 493 of file rpmlib.h.

#define RPMFILE_STATE_MISSING   -1

Definition at line 469 of file rpmlib.h.

Referenced by rpmfiFState(), and showQueryPackage().

#define RPMLEAD_BINARY   0

Definition at line 1096 of file rpmlib.h.

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

#define RPMLEAD_MAGIC0   0xed

Definition at line 1099 of file rpmlib.h.

#define RPMLEAD_MAGIC1   0xab

Definition at line 1100 of file rpmlib.h.

#define RPMLEAD_MAGIC2   0xee

Definition at line 1101 of file rpmlib.h.

#define RPMLEAD_MAGIC3   0xdb

Definition at line 1102 of file rpmlib.h.

#define RPMLEAD_SIZE   96

Don't rely on sizeof(struct)

Definition at line 1104 of file rpmlib.h.

#define RPMLEAD_SOURCE   1

Definition at line 1097 of file rpmlib.h.

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

#define RPMSENSE_SENSEMASK   15
#define RPMSENSE_TRIGGER   (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN)

Definition at line 539 of file rpmlib.h.

Referenced by addReqProv().

#define RPMTAG_C   RPMTAG_CONFLICTNAME

Definition at line 336 of file rpmlib.h.

#define RPMTAG_CONFLICTS   RPMTAG_CONFLICTNAME

Definition at line 335 of file rpmlib.h.

#define RPMTAG_COPYRIGHT   RPMTAG_LICENSE

Definition at line 284 of file rpmlib.h.

#define RPMTAG_D   RPMTAG_REQUIRENAME

Definition at line 329 of file rpmlib.h.

#define RPMTAG_E   RPMTAG_EPOCH

Definition at line 271 of file rpmlib.h.

#define RPMTAG_EXTERNAL_TAG   1000000

Definition at line 457 of file rpmlib.h.

Referenced by convertExistingAMD(), and main().

#define RPMTAG_HDRID   RPMTAG_SHA1HEADER

Definition at line 262 of file rpmlib.h.

#define RPMTAG_N   RPMTAG_NAME

Definition at line 265 of file rpmlib.h.

#define RPMTAG_O   RPMTAG_OBSOLETENAME

Definition at line 367 of file rpmlib.h.

#define RPMTAG_OBSOLETES   RPMTAG_OBSOLETENAME

Definition at line 366 of file rpmlib.h.

#define RPMTAG_P   RPMTAG_PROVIDENAME

Definition at line 325 of file rpmlib.h.

#define RPMTAG_PKGID   RPMTAG_SIGMD5

Definition at line 252 of file rpmlib.h.

#define RPMTAG_PROVIDES   RPMTAG_PROVIDENAME

Definition at line 324 of file rpmlib.h.

Referenced by rpmfcELF().

#define RPMTAG_R   RPMTAG_RELEASE

Definition at line 269 of file rpmlib.h.

#define RPMTAG_REQUIRES   RPMTAG_REQUIRENAME

Definition at line 328 of file rpmlib.h.

#define RPMTAG_SERIAL   RPMTAG_EPOCH

Definition at line 272 of file rpmlib.h.

#define RPMTAG_SVNID   RPMTAG_CVSID

Definition at line 449 of file rpmlib.h.

#define RPMTAG_V   RPMTAG_VERSION

Definition at line 267 of file rpmlib.h.

#define RPMVAR_INCLUDE   43

Definition at line 574 of file rpmlib.h.

Referenced by doReadRC().

#define RPMVAR_MACROFILES   49

Definition at line 575 of file rpmlib.h.

Referenced by doReadRC(), and rpmReadRC().

#define RPMVAR_NUM   55

Definition at line 577 of file rpmlib.h.

Referenced by rpmFreeRpmrc().

#define RPMVAR_OPTFLAGS   3

Definition at line 572 of file rpmlib.h.

Referenced by rpmRebuildTargetVars(), and setDefaults().

#define RPMVAR_PROVIDES   38

Definition at line 573 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)

Typedef Documentation

typedef void* alKey

An added/available package retrieval key.

Definition at line 80 of file rpmlib.h.

typedef int alNum

An added/available package retrieval index.

Definition at line 87 of file rpmlib.h.

typedef enum fileAction_e fileAction

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

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.

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 764 of file rpmlib.h.

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 726 of file rpmlib.h.

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 743 of file rpmlib.h.

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 779 of file rpmlib.h.

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 793 of file rpmlib.h.

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.

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.

File Attributes.

File States (when installed).

Todo:
Generalize filter mechanism.
typedef struct rpmpsm_s* rpmpsm

Package state machine data.

Definition at line 882 of file rpmlib.h.

typedef enum rpmRC_e rpmRC

Package read return codes.

We pass these around as an array with a sentinel.

Dependency Attributes.

typedef enum rpmTag_e rpmTag

Tags identify data in package headers.

Note:
tags should not have value 0!
Todo:
: Somehow supply type
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.

Bit(s) to control rpmtsRun() operation.

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.


Enumeration Type Documentation

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

Enumerator:
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 834 of file rpmlib.h.

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.

Enumerator:
PIPE 

pipe/fifo

CDEV 

character device

XDIR 

directory

BDEV 

block device

REG 

regular file

LINK 

hard link

SOCK 

socket

Definition at line 859 of file rpmlib.h.

File Attributes.

Enumerator:
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, internal

RPMFILE_UNPATCHED 

placeholder (SuSE)

RPMFILE_PUBKEY 

from %pubkey

RPMFILE_POLICY 

from %policy

Definition at line 474 of file rpmlib.h.

File States (when installed).

Enumerator:
RPMFILE_STATE_NORMAL 
RPMFILE_STATE_REPLACED 
RPMFILE_STATE_NOTINSTALLED 
RPMFILE_STATE_NETSHARED 
RPMFILE_STATE_WRONGCOLOR 

Definition at line 462 of file rpmlib.h.

Todo:
Generalize filter mechanism.
Enumerator:
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 799 of file rpmlib.h.

enum rpmRC_e

Package read return codes.

Enumerator:
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.

Dependency Attributes.

Enumerator:
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_MISSINGOK 

suggests/enhances hint.

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 498 of file rpmlib.h.

enum rpmTag_e

Tags identify data in package headers.

Note:
tags should not have value 0!
Todo:
: Somehow supply type
Enumerator:
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 

Definition at line 232 of file rpmlib.h.

Bit(s) to control rpmtsRun() operation.

Enumerator:
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_NOCONTEXTS 

from --nocontexts

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 

from --anaconda

RPMTRANS_FLAG_NOMD5 

from --nomd5

RPMTRANS_FLAG_NOSUGGEST 

from --nosuggest

RPMTRANS_FLAG_ADDINDEPS 

from --aid

RPMTRANS_FLAG_NOCONFIGS 

from --noconfigs

RPMTRANS_FLAG_DEPLOOPS 

from --deploops

Definition at line 968 of file rpmlib.h.


Function Documentation

static 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.

Referenced by addFileToTagAux(), addOrAppendListEntry(), addSource(), base64Format(), buildForTarget(), checkFiles(), checkPackageSet(), closeCallback(), closeSpec(), cpio_doio(), cpioHeaderRead(), db3close(), db3open(), db3stat(), db_init(), dbiFreeIndexSet(), dbiTagsInit(), defaultMachine(), delTE(), dnlFreeIterator(), domd5(), doPatch(), doReadRC(), doRmSource(), doScript(), doSetupMacro(), doUntar(), ensureOlder(), expandFilelist(), expandRegular(), fillOutMainPackage(), freeAttrRec(), freeBadDeps(), freeFileList(), freeFilesystems(), freeFSM(), freeHardLink(), freeItem(), freeItems(), freeNames(), freePackage(), freeRpmVar(), freeSl(), freeSources(), freeSpec(), freeSplitString(), freeSt(), freeTriggerFiles(), fsmCommitLinks(), fsmMakeLinks(), fsmMapPath(), fsmStage(), fssizesTag(), genCpioListAndHeader(), getFilesystemList(), getRepackageHeaderFromTE(), handleInstInstalledFiles(), handlePreambleTag(), hdr_dealloc(), hdrSprintf(), hdrUnload(), headerCheck(), headerCheckPayloadFormat(), htFree(), i18nTag(), IDTXfree(), IDTXglob(), ignoreDep(), initGlobs(), machCompatCacheAdd(), machFindEquivs(), main(), makeGPGSignature(), makeHDRSignature(), makePGPSignature(), makeTempFile(), mapFreeIterator(), miFreeHeader(), mireSkip(), mungeFilelist(), newRpmdb(), packageBinaries(), packageSources(), parseDescription(), parseExpressionBoolean(), parseExpressionString(), parseFiles(), parseFmt(), parseForRegexLang(), parseForSimple(), parseRCPOT(), parseScript(), parseSpec(), permsFormat(), printFileInfo(), printNewSpecfile(), processBinaryFile(), processMetadataFile(), processPackageFiles(), processSourceFiles(), readIcon(), readLine(), readLineFromOFI(), relocateFileList(), rhnUnload(), rpmalAllFileSatisfiesDepend(), rpmalAllSatisfiesDepend(), rpmalDel(), rpmalFree(), rpmalFreeIndex(), rpmaviFree(), rpmcliAllArgCallback(), rpmcliImportPubkey(), rpmcliImportPubkeys(), rpmcliQuery(), rpmdbAdd(), rpmdbClose(), rpmdbFindByFile(), rpmdbFindFpListExclude(), rpmdbFreeIterator(), rpmdbInitIterator(), rpmdbNextIterator(), rpmdbRebuild(), rpmdbRemove(), rpmdbSetIteratorRE(), rpmDetectPGPVersion(), rpmds_compare(), rpmdsCompare(), rpmdsFilter(), rpmdsFree(), rpmdsMerge(), rpmdsNext(), rpmfcELF(), rpmfcExec(), rpmfcFree(), rpmfcGenerateDepends(), rpmfcGenerateDependsHelper(), rpmfd_Fopen(), rpmfiBuildFClasses(), rpmfiBuildFContexts(), rpmfiBuildFDeps(), rpmfiBuildFNames(), rpmfiBuildFSContexts(), rpmfiBuildREContexts(), rpmfiFree(), rpmfiNew(), rpmFreeRpmrc(), rpmfts_dealloc(), rpmfts_initialize(), rpmGetFilesystemUsage(), rpmGetPassPhrase(), rpmGetRpmlibProvides(), rpmgiFree(), rpmgiGlobArgv(), rpmgiInitFilter(), rpmgiLoadReadHeader(), rpmgiNext(), rpmgiOpen(), rpmGraph(), rpmInstall(), rpmInstallSource(), rpmInstallSourcePackage(), rpmLookupSignatureType(), rpmMergeHeaders(), rpmPlatform(), rpmpsFree(), rpmpsmFree(), rpmpsmStage(), rpmpsPrint(), rpmQueryVerify(), rpmReadConfigFiles(), rpmReadHeader(), rpmReadPackageFile(), rpmReadPackageManifest(), rpmReadRC(), rpmRebuildTargetVars(), rpmReSign(), rpmRollback(), rpmSetMachine(), rpmSetVarArch(), rpmShowProgress(), rpmsxFree(), rpmsxParse(), rpmsxSort(), rpmteFree(), rpmteFreeTSI(), rpmts_GetKeys(), rpmts_HdrCheck(), rpmts_IDTXglob(), rpmts_Run(), rpmtsAddInstallElement(), rpmtsAvailable(), rpmtsClean(), rpmtsFindPubkey(), rpmtsFree(), rpmtsInitDSI(), rpmtsOpenDB(), rpmtsOpenSDB(), rpmtsOrder(), rpmtsRun(), rpmtsScoreFree(), rpmtsSetCurrDir(), rpmtsSetRootDir(), rpmtsSolve(), rpmVerifySignatures(), runScript(), saveHardLink(), setPathDefault(), showQueryPackage(), skipFiles(), spewHeader(), triggercondsTag(), valueFree(), verifyMD5Signature(), verifySHA1Signature(), writeLinkedFile(), writeRPM(), xmlFormat(), XrpmtsiFree(), and zapRelation().

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 verification error message (or NULL)
Returns:
RPMRC_OK on success

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, entryInfo_s::count, pgpDigParams_s::hash_algo, pgpDig_s::hdrmd5ctx, pgpDig_s::hdrsha1ctx, header_magic, headerVerifyInfo(), indexEntry_s::info, pgpDig_s::nbytes, entryInfo_s::offset, PGPHASHALGO_SHA1, pgpPrtPkts(), REGION_TAG_COUNT, REGION_TAG_TYPE, RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), rpmIsDebug, RPMMESS_ERROR, rpmMessage, RPMRC_FAIL, RPMRC_NOTFOUND, RPMRC_OK, rpmswEnter(), rpmswExit(), RPMTAG_HEADERIMMUTABLE, RPMTS_OP_DIGEST, rpmtsCleanDig(), rpmtsDig(), rpmtsOp(), rpmtsSetSig(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NODSAHEADER, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, pgpDig_s::signature, entryInfo_s::tag, entryInfo_s::type, pgpDigParams_s::version, vsflags, xmalloc(), and xstrdup().

Referenced by rpmpsmStage(), rpmReadHeader(), rpmts_HdrCheck(), rpmtsInitIterator(), and rpmtsRebuildDB().

rpmRC headerCheckPayloadFormat ( Header  h  ) 

Check for supported payload format in header.

Parameters:
h header to check
Returns:
RPMRC_OK if supported, RPMRC_FAIL otherwise

Definition at line 1078 of file package.c.

References _, _free(), headerGetEntry(), hGetNEVRA(), RPMMESS_ERROR, rpmMessage, RPMRC_FAIL, and RPMRC_OK.

Referenced by rpmtsAddInstallElement().

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 82 of file rpmlibprov.c.

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

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 273 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 287 of file fs.c.

References _, _free(), dirName, errno, fsnames, getFilesystemList(), numFilesystems, RPMERR_BADDEV, RPMERR_STAT, rpmError, rpmGetPath(), 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 101 of file rpmlibprov.c.

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

rpmRC rpmInstallSourcePackage ( rpmts  ts,
FD_t  fd,
const char **  specFilePtr,
const char **  cookie 
)
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 655 of file package.c.

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

Referenced by rpmReadPackageFile().

rpmRC 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:
RPMRC_OK on success

Todo:
Implement disable/enable/warn/error/anal policy.

Definition at line 753 of file package.c.

References _, _chk, _free(), _print_pkts, rpmop_s::count, entryInfo_s::count, _FD_s::digests, fdInitDigest(), FDSTAT_READ, Fileno(), Fread(), Fstrerror(), pgpDigParams_s::hash_algo, _FDDIGEST_s::hashalgo, _FDDIGEST_s::hashctx, pgpDig_s::hdrmd5ctx, pgpDig_s::hdrsha1ctx, header_magic, headerFree(), headerFreeData(), headerGetEntry(), headerIsEntry(), headerLink(), headerMergeLegacySigs(), legacyRetrofit(), rpmlead::major, pgpDig_s::md5ctx, pgpDig_s::nbytes, _FD_s::ndigests, PGPHASHALGO_MD5, PGPHASHALGO_SHA1, PGPHASHALGO_SHA256, PGPHASHALGO_SHA384, PGPHASHALGO_SHA512, pgpPrtPkts(), readLead(), RPMDIGEST_NONE, rpmDigestInit(), rpmDigestUpdate(), RPMERR_FREAD, RPMERR_NEWPACKAGE, RPMERR_SIGGEN, rpmError, rpmFreeSignature(), rpmIsDebug, RPMMESS_DEBUG, RPMMESS_ERROR, RPMMESS_WARNING, rpmMessage, 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, rpmswEnter(), rpmswExit(), RPMTAG_HEADERIMMUTABLE, RPMTS_OP_DIGEST, RPMTS_OP_SIGNATURE, rpmtsCleanDig(), rpmtsDig(), rpmtsOp(), rpmtsSetSig(), rpmtsStashKeyid(), rpmtsVSFlags(), rpmVerifySignature(), RPMVSF_NEEDPAYLOAD, RPMVSF_NODSA, RPMVSF_NODSAHEADER, RPMVSF_NOMD5, RPMVSF_NORSA, RPMVSF_NORSAHEADER, RPMVSF_NOSHA1HEADER, pgpDig_s::sha1ctx, pgpDig_s::signature, rpmlead::signature_type, _FD_s::stats, pgpDigParams_s::version, and vsflags.

Referenced by ftsStashLatest(), IDTXglob(), main(), readRPM(), rpmgiReadHeader(), rpmGraph(), rpmInstall(), rpmInstallSourcePackage(), 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 xisalnum(), xisalpha(), and xisdigit().

Referenced by compare_values(), 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 61 of file psm.c.

References headerGetEntry(), and rpmvercmp().

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

const char* const tagName ( int  tag  ) 
int tagType ( int  tag  ) 

Return tag data type from value.

Parameters:
tag tag value
Returns:
tag data type, RPM_NULL_TYPE on not found.

Definition at line 20 of file tagname.c.

References rpmTagTable, rpmTagTableSize, tagcmp(), headerTagTableEntry_s::type, and headerTagTableEntry_s::val.

Referenced by writeRPM().

int tagValue ( const char *  tagstr  ) 

Return tag value from name.

Parameters:
tagstr name of tag
Returns:
tag value, -1 on not found

Definition at line 85 of file tagname.c.

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

Referenced by dbiTagsInit(), and rpmgiInitFilter().


Variable Documentation

Definition at line 76 of file macro.c.

Referenced by main(), and rpmcliAllArgCallback().

const char* rpmEVR

Definition at line 51 of file depends.c.

Referenced by printVersion().

int rpmFLAGS

Definition at line 54 of file depends.c.

Definition at line 71 of file macro.c.

Referenced by newSpec().

const char* rpmNAME

Definition at line 48 of file depends.c.

const int rpmTagTableSize

Number of entries in rpmTagTable.

Definition at line 169 of file tagtbl.c.

Referenced by init_rpm(), rpmDisplayQueryTags(), tagName(), tagNumFromPyObject(), and tagType().

const char* RPMVERSION

Definition at line 8 of file misc.c.

Referenced by rpmcliImportPubkey().


Generated on 8 Jun 2012 for rpm by  doxygen 1.6.1