lib/psm.h File Reference

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

#include <rpmsq.h>

Go to the source code of this file.

Data Structures

struct  rpmpsm_s

Defines

#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))
#define rpmpsmUnlink(_psm, _msg)   XrpmpsmUnlink(_psm, _msg, __FILE__, __LINE__)
#define rpmpsmLink(_psm, _msg)   XrpmpsmLink(_psm, _msg, __FILE__, __LINE__)
#define rpmpsmUNSAFE   rpmpsmSTAGE

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

rpmpsm rpmpsmUnlink (rpmpsm psm, const char *msg)
 Unreference a package state machine instance.
rpmpsm XrpmpsmUnlink (rpmpsm psm, const char *msg, const char *fn, unsigned ln)
rpmpsm rpmpsmLink (rpmpsm psm, const char *msg)
 Reference a package state machine instance.
rpmpsm XrpmpsmLink (rpmpsm psm, const char *msg, const char *fn, unsigned ln)
rpmpsm rpmpsmFree (rpmpsm psm)
 Destroy a package state machine.
rpmpsm rpmpsmNew (rpmts ts, rpmte te, rpmfi fi)
 Create and load a package state machine.
rpmRC rpmpsmStage (rpmpsm psm, pkgStage stage)
 Package state machine driver.

Variables

int _psm_debug


Detailed Description

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

Definition in file psm.h.


Define Documentation

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

Definition at line 25 of file psm.h.

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

Definition at line 23 of file psm.h.

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

Definition at line 24 of file psm.h.

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

Definition at line 22 of file psm.h.

#define PSM_DEAD   0x1000

Definition at line 21 of file psm.h.

#define PSM_INTERNAL   0x4000

Definition at line 19 of file psm.h.

#define PSM_SYSCALL   0x2000

Definition at line 20 of file psm.h.

#define PSM_VERBOSE   0x8000

Definition at line 18 of file psm.h.

#define rpmpsmLink ( _psm,
_msg   )     XrpmpsmLink(_psm, _msg, __FILE__, __LINE__)

Definition at line 152 of file psm.h.

#define rpmpsmUnlink ( _psm,
_msg   )     XrpmpsmUnlink(_psm, _msg, __FILE__, __LINE__)

Definition at line 133 of file psm.h.

#define rpmpsmUNSAFE   rpmpsmSTAGE

Definition at line 184 of file psm.h.


Typedef Documentation

typedef enum pkgStage_e pkgStage


Enumeration Type Documentation

enum pkgStage_e

Enumerator:
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 26 of file psm.h.


Function Documentation

rpmpsm rpmpsmFree ( rpmpsm  psm  ) 

Destroy a package state machine.

Parameters:
psm package state machine
Returns:
NULL always

Definition at line 1273 of file psm.c.

Referenced by rpmtsRun(), and rpmVerifyScript().

rpmpsm rpmpsmLink ( rpmpsm  psm,
const char *  msg 
)

Reference a package state machine instance.

Parameters:
psm package state machine
msg 
Returns:
new package state machine reference

rpmpsm rpmpsmNew ( rpmts  ts,
rpmte  te,
rpmfi  fi 
)

Create and load a package state machine.

Parameters:
ts transaction set
te transaction set element
fi file info set
Returns:
new package state machine

Definition at line 1306 of file psm.c.

Referenced by rpmtsRun(), and rpmVerifyScript().

rpmRC rpmpsmStage ( rpmpsm  psm,
pkgStage  stage 
)

Package state machine driver.

Parameters:
psm package state machine data
stage next stage
Returns:
0 on success
Todo:
Packages w/o files never get a callback, hence don't get displayed on install with -v.

Definition at line 1349 of file psm.c.

Referenced by rpmInstallSourcePackage(), rpmpsmNext(), rpmtsRun(), and rpmVerifyScript().

rpmpsm rpmpsmUnlink ( rpmpsm  psm,
const char *  msg 
)

Unreference a package state machine instance.

Parameters:
psm package state machine
msg 
Returns:
NULL always

rpmpsm XrpmpsmLink ( rpmpsm  psm,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.

Definition at line 1260 of file psm.c.

rpmpsm XrpmpsmUnlink ( rpmpsm  psm,
const char *  msg,
const char *  fn,
unsigned  ln 
)

Todo:
Remove debugging entry from the ABI.

Definition at line 1249 of file psm.c.


Variable Documentation

int _psm_debug

Definition at line 38 of file psm.c.


Generated on Sun Jun 1 21:56:23 2008 for rpm by  doxygen 1.5.4