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

lib/psm.h File Reference

Package state machine to handle a package from a transaction set. More...

#include <rpmlib.h>
#include "depends.h"
#include "fsm.h"

Go to the source code of this file.

Data Structures

struct  psm_s
struct  sharedFileInfo
struct  transactionFileInfo_s

Defines

#define TFIMAGIC   0x09697923
#define PSM_VERBOSE   0x8000
#define PSM_INTERNAL   0x4000
#define PSM_SYSCALL   0x2000
#define PSM_DEAD   0x1000
#define _fv(_a)   ((_a) | PSM_VERBOSE)
#define _fi(_a)   ((_a) | PSM_INTERNAL)
#define _fs(_a)   ((_a) | (PSM_INTERNAL | PSM_SYSCALL))
#define _fd(_a)   ((_a) | (PSM_INTERNAL | PSM_DEAD))

Typedefs

typedef enum pkgStage_e  pkgStage

Enumerations

enum  pkgStage_e {
  PSM_UNKNOWN = 0, PSM_INIT = 1, PSM_PRE = 2, PSM_PROCESS = 3,
  PSM_POST = 4, PSM_UNDO = 5, PSM_FINI = 6, PSM_PKGINSTALL = 7,
  PSM_PKGERASE = 8, PSM_PKGCOMMIT = 10, PSM_PKGSAVE = 12, PSM_CREATE = 17,
  PSM_NOTIFY = 22, PSM_DESTROY = 23, PSM_COMMIT = 25, PSM_CHROOT_IN = 51,
  PSM_CHROOT_OUT = 52, PSM_SCRIPT = 53, PSM_TRIGGERS = 54, PSM_IMMED_TRIGGERS = 55,
  PSM_RPMIO_FLAGS = 56, PSM_RPMDB_LOAD = 97, PSM_RPMDB_ADD = 98, PSM_RPMDB_REMOVE = 99
}

Functions

void loadFi (Header h, TFI_t fi)
 Load data from header into transaction file element info. More...

void freeFi (TFI_t fi)
 Destroy transaction element file info. More...

const char* const fiTypeString (TFI_t fi)
 Return formatted string representation of package disposition. More...

int psmStage (PSM_t psm, pkgStage stage)
 Package state machine driver. More...


Detailed Description

Package state machine to handle a package from a transaction set.

Definition in file psm.h.


Define Documentation

#define PSM_DEAD   0x1000
 

Definition at line 93 of file psm.h.

#define PSM_INTERNAL   0x4000
 

Definition at line 91 of file psm.h.

#define PSM_SYSCALL   0x2000
 

Definition at line 92 of file psm.h.

#define PSM_VERBOSE   0x8000
 

Definition at line 90 of file psm.h.

#define TFIMAGIC   0x09697923
 

Definition at line 76 of file psm.h.

#define _fd( _a )   ((_a) | (PSM_INTERNAL | PSM_DEAD))
 

Definition at line 97 of file psm.h.

#define _fi( _a )   ((_a) | PSM_INTERNAL)
 

Definition at line 95 of file psm.h.

#define _fs( _a )   ((_a) | (PSM_INTERNAL | PSM_SYSCALL))
 

Definition at line 96 of file psm.h.

#define _fv( _a )   ((_a) | PSM_VERBOSE)
 

Definition at line 94 of file psm.h.


Typedef Documentation

typedef enum pkgStage_e pkgStage
 


Enumeration Type Documentation

enum pkgStage_e
 

Enumeration values:
PSM_UNKNOWN  
PSM_INIT  
PSM_PRE  
PSM_PROCESS  
PSM_POST  
PSM_UNDO  
PSM_FINI  
PSM_PKGINSTALL  
PSM_PKGERASE  
PSM_PKGCOMMIT  
PSM_PKGSAVE  
PSM_CREATE  
PSM_NOTIFY  
PSM_DESTROY  
PSM_COMMIT  
PSM_CHROOT_IN  
PSM_CHROOT_OUT  
PSM_SCRIPT  
PSM_TRIGGERS  
PSM_IMMED_TRIGGERS  
PSM_RPMIO_FLAGS  
PSM_RPMDB_LOAD  
PSM_RPMDB_ADD  
PSM_RPMDB_REMOVE  

Definition at line 98 of file psm.h.


Function Documentation

const char* const fiTypeString ( TFI_t fi )
 

Return formatted string representation of package disposition.

Parameters:
a   package dispostion
Returns:
formatted string

Definition at line 235 of file psm.c.

Referenced by fsmStage(), and psm_s::stage().

void freeFi ( TFI_t fi )
 

Destroy transaction element file info.

Parameters:
fi   transaction element file info

Definition at line 188 of file psm.c.

Referenced by freeFl(), freePackage(), freeSpec(), rpmInstallSourcePackage(), rpmVerifyScript(), and psm_s::stage().

void loadFi ( Header h,
TFI_t fi )
 

Load data from header into transaction file element info.

Parameters:
h   header
fi   transaction element file info

Definition at line 72 of file psm.c.

Referenced by genCpioListAndHeader(), rpmInstallSourcePackage(), rpmRunTransactions(), rpmVerifyScript(), and psm_s::stage().

int psmStage ( PSM_t psm,
pkgStage stage )
 

Package state machine driver.

Todo:
Packages w/o files never get a callback, hence don't get displayed on install with -v.

Definition at line 1312 of file psm.c.

Referenced by rpmInstallSourcePackage(), rpmRunTransactions(), rpmVerifyScript(), and psm_s::stage().


Generated at Thu Sep 6 11:25:45 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001