lib/rpmlib.h File Reference

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

#include <rpmtag.h>
#include <rpmversion.h>

Include dependency graph for rpmlib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rpmRelocation_s

RPMRC

#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...
void * platpat
int nplatpat
int rpmReadConfigFiles (const char *file, const char *target)
 Read macro configuration file(s) for a target.
int rpmPlatformScore (const char *platform, void *mi_re, int mi_nre)
 Return score of a platform string.
int rpmShowRC (FILE *fp)
 Display current rpmrc (and macro) configuration.
void rpmSetTables (int archTable, int osTable)
void rpmFreeRpmrc (void)

RPMTS

typedef struct rpmRelocation_srpmRelocation
 We pass these around as an array with a sentinel.
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.
int rpmVersionCompare (Header first, Header second)
 Compare headers to determine which header is "newer".
rpmRC rpmReadPackageFile (rpmts ts, void *_fd, const char *fn, Header *hdrp)
 Return package header from file handle, verifying digests/signatures.
rpmRC rpmInstallSourcePackage (rpmts ts, void *_fd, const char **specFilePtr, const char **cookie)
 Install source package.

Defines

#define RPM_FORMAT_VERSION   5
#define RPM_MAJOR_VERSION   0
#define RPM_MINOR_VERSION   0
#define RPMAL_NOMATCH   ((alKey)-1L)

Typedefs

typedef enum rpmRC_e rpmRC
 Package read return codes.
typedef struct rpmts_s * rpmts
 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_s * rpmds
 Dependency tag sets from a header, so that a header can be discarded early.
typedef struct rpmPRCO_s * rpmPRCO
 Container for commonly extracted dependency set(s).
typedef struct rpmfi_s * rpmfi
 File info tag sets from a header, so that a header can be discarded early.
typedef struct rpmte_s * rpmte
 An element of a transaction set, i.e.
typedef struct rpmdb_s * rpmdb
 Database of headers and tag value indices.
typedef struct
rpmdbMatchIterator_s
rpmdbMatchIterator
 Database iterator.
typedef struct rpmgi_s * rpmgi
 Generalized iterator.
typedef enum rpmScriptID_e rpmScriptID
 Scriptlet identifiers.
typedef enum rpmScriptState_e rpmScriptState
 Scriptlet states (when installed).

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  rpmScriptID_e {
  RPMSCRIPT_UNKNOWN = 0, RPMSCRIPT_PRETRANS = 1, RPMSCRIPT_TRIGGERPREIN = 2, RPMSCRIPT_PREIN = 3,
  RPMSCRIPT_POSTIN = 4, RPMSCRIPT_TRIGGERIN = 5, RPMSCRIPT_TRIGGERUN = 6, RPMSCRIPT_PREUN = 7,
  RPMSCRIPT_POSTUN = 8, RPMSCRIPT_TRIGGERPOSTUN = 9, RPMSCRIPT_POSTTRANS = 10, RPMSCRIPT_VERIFY = 16,
  RPMSCRIPT_SANITYCHECK = 17, RPMSCRIPT_MAX = 32
}
 Scriptlet identifiers. More...
enum  rpmScriptState_e {
  RPMSCRIPT_STATE_UNKNOWN = 0, RPMSCRIPT_STATE_EXEC = (1 << 16), RPMSCRIPT_STATE_REAPED = (1 << 17), RPMSCRIPT_STATE_SELINUX = (1 << 24),
  RPMSCRIPT_STATE_EMULATOR = (1 << 25), RPMSCRIPT_STATE_LUA = (1 << 26)
}
 Scriptlet states (when installed). More...

Variables

struct MacroContext_s * rpmGlobalMacroContext
struct MacroContext_s * rpmCLIMacroContext
const char * RPMVERSION
const char * rpmNAME
const char * rpmEVR
int rpmFLAGS
unsigned int * keyids
headerSprintfExtension 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 RPM_FORMAT_VERSION   5

Definition at line 14 of file rpmlib.h.

#define RPM_MACHTABLE_COUNT   4

No. of arch/os tables.

Definition at line 175 of file rpmlib.h.

Referenced by rpmFreeRpmrc().

#define RPM_MAJOR_VERSION   0

Definition at line 15 of file rpmlib.h.

#define RPM_MINOR_VERSION   0

Definition at line 16 of file rpmlib.h.

#define RPMAL_NOMATCH   ((alKey)-1L)


Typedef Documentation

typedef enum rpmRC_e rpmRC

Package read return codes.

typedef struct rpmRelocation_s* rpmRelocation

We pass these around as an array with a sentinel.

Definition at line 246 of file rpmlib.h.

typedef enum rpmScriptID_e rpmScriptID

Scriptlet identifiers.

Scriptlet states (when installed).


Enumeration Type Documentation

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

Scriptlet identifiers.

Enumerator:
RPMSCRIPT_UNKNOWN  unknown scriptlet
RPMSCRIPT_PRETRANS  pretrans scriptlet
RPMSCRIPT_TRIGGERPREIN  triggerprein scriptlet
RPMSCRIPT_PREIN  pre scriptlet
RPMSCRIPT_POSTIN  post scriptlet
RPMSCRIPT_TRIGGERIN  triggerin scriptlet
RPMSCRIPT_TRIGGERUN  triggerun scriptlet
RPMSCRIPT_PREUN  preun scriptlet
RPMSCRIPT_POSTUN  postun scriptlet
RPMSCRIPT_TRIGGERPOSTUN  triggerpostun scriptlet
RPMSCRIPT_POSTTRANS  posttrans scriptlet
RPMSCRIPT_VERIFY  verify scriptlet
RPMSCRIPT_SANITYCHECK  sanitycheck scriptlet
RPMSCRIPT_MAX 

Definition at line 128 of file rpmlib.h.

Scriptlet states (when installed).

Enumerator:
RPMSCRIPT_STATE_UNKNOWN 
RPMSCRIPT_STATE_EXEC  scriptlet was exec'd
RPMSCRIPT_STATE_REAPED  scriptlet was reaped
RPMSCRIPT_STATE_SELINUX  scriptlet exec by SELinux
RPMSCRIPT_STATE_EMULATOR  scriptlet exec in emulator
RPMSCRIPT_STATE_LUA  scriptlet exec with lua

Definition at line 149 of file rpmlib.h.


Function Documentation

rpmRC rpmInstallSourcePackage ( rpmts  ts,
void *  _fd,
const char **  specFilePtr,
const char **  cookie 
)

Install source package.

Deprecated:
This routine needs to DIE! DIE! DIE!.
Todo:
Eliminate in rpm-5.1, insturment rpmtsRun() state machine instead.
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 184 of file psm.c.

References _, _free(), Access(), alloca(), rpmDataType_u::argv, CPIO_MAP_GID, CPIO_MAP_MODE, CPIO_MAP_PATH, CPIO_MAP_UID, FA_CREATE, Fclose(), fdLink, headerFree(), headerGet(), headerIsEntry(), headerLink(), headerMacrosLoad(), _HE_s::p, PSM_FINI, PSM_PKGINSTALL, PSM_PROCESS, rpmExpand(), rpmfiFree(), RPMFILE_SPECFILE, rpmfiLink, rpmfiNew(), rpmGenPath(), rpmlog(), RPMLOG_ERR, rpmMkdirPath(), rpmpsmStage(), RPMRC_FAIL, RPMRC_NOKEY, RPMRC_NOTTRUSTED, RPMRC_OK, rpmReadPackageFile(), RPMTAG_ARCH, RPMTAG_BASENAMES, RPMTAG_COOKIE, RPMTAG_FILEPATHS, RPMTAG_SOURCERPM, rpmteSetHeader(), rpmtsAddInstallElement(), rpmtsClean(), rpmtsElement(), rpmtsFree(), rpmtsLink, rpmtsRootDir(), stpcpy(), rpmDataType_u::str, _HE_s::tag, W_OK, and xmalloc().

Referenced by rpmInstallSource().

rpmRC rpmReadPackageFile ( rpmts  ts,
void *  _fd,
const char *  fn,
Header hdrp 
)

int rpmVersionCompare ( Header  first,
Header  second 
)

Compare headers to determine which header is "newer".

Deprecated:
Use rpmdsCompare instead.
Todo:
Eliminate in rpm-5.1.
Parameters:
first 1st header
second 2nd header
Returns:
result of comparison

Definition at line 54 of file psm.c.

References _free(), alloca(), headerGet(), _HE_s::p, rpmDataType_u::ptr, RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, rpmvercmp, rpmDataType_u::str, _HE_s::tag, and rpmDataType_u::ui32p.

Referenced by hdr_compare(), and rpmcliInstall().


Variable Documentation

unsigned int* keyids

Definition at line 38 of file package.c.

Referenced by pgpStashKeyid(), and rpmcliFini().

int nplatpat

Definition at line 31 of file rpmrc.c.

Referenced by rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), and rpmtsAddInstallElement().

void* platpat

Definition at line 29 of file rpmrc.c.

Referenced by rpmFreeRpmrc(), rpmPlatform(), rpmPlatformScore(), and rpmtsAddInstallElement().

struct MacroContext_s* rpmCLIMacroContext

Definition at line 93 of file macro.c.

Referenced by rpmcliAllArgCallback(), rpmcliFini(), and rpmInitMacros().

const char* rpmEVR

Definition at line 58 of file depends.c.

Referenced by printVersion().

int rpmFLAGS

Definition at line 61 of file depends.c.

struct MacroContext_s* rpmGlobalMacroContext

Table of query format extensions.

Note:
Chains *headerCompoundFormats -> *headerDefaultFormats.

Definition at line 292 of file formats.c.

Referenced by hdr_subscript(), hdrSprintf(), init_rpm(), packageBinaries(), parseForSimple(), printNewSpecfile(), queryHeader(), rpmcliImportPubkey(), rpmfiNew(), rpmpsmStage(), rpmShowProgress(), rpmtsImportPubkey(), and rpmtsSolve().

const char* rpmNAME

Definition at line 55 of file depends.c.

const char* RPMVERSION

Definition at line 8 of file misc.c.

Referenced by rpmcliImportPubkey(), and rpmtsImportPubkey().


Generated on Wed Dec 10 00:34:18 2008 for rpm by  doxygen 1.5.6