Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

RPMTRANS.


Files

file  install.c
file  rpmlib.h
file  transaction.c
file  uninstall.c

RPMTS

typedef struct rpmTransactionSet_srpmTransactionSet
enum  rpmtransFlags_e {
  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_MULTILIB = (1 << 8)
}
rpmTransactionSet rpmtransCreateSet (rpmdb rpmdb, const char *rootdir)
int rpmtransAddPackage (rpmTransactionSet ts, Header h, FD_t fd, const void *key, int update, rpmRelocation *relocs)
void rpmtransAvailablePackage (rpmTransactionSet ts, Header h, const void *key)
void rpmtransRemovePackage (rpmTransactionSet ts, int dboffset)
void rpmtransFree (rpmTransactionSet ts)
void rpmtransSetScriptFd (rpmTransactionSet ts, FD_t fd)
int rpmtransGetKeys (const rpmTransactionSet ts, const void ***ep, int *nep)
int rpmdepCheck (rpmTransactionSet ts, struct rpmDependencyConflict **conflicts, int *numConflicts)
int rpmdepOrder (rpmTransactionSet ts)
void rpmdepFreeConflicts (struct rpmDependencyConflict *conflicts, int numConflicts)
int rpmGetRpmlibProvides (const char ***provNames, int **provFlags, const char ***provVersions)
int rpmRangesOverlap (const char *AName, const char *AEVR, int AFlags, const char *BName, const char *BEVR, int BFlags)
int rpmCheckRpmlibProvides (const char *keyName, const char *keyEVR, int keyFlags)
int rpmRunTransactions (rpmTransactionSet ts, rpmCallbackFunction notify, rpmCallbackData notifyData, rpmProblemSet okProbs, rpmProblemSet *newProbs, rpmtransFlags transFlags, rpmprobFilterFlags ignoreSet)

Typedef Documentation

typedef struct rpmTransactionSet_s * rpmTransactionSet
 

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


Enumeration Type Documentation

enum rpmtransFlags_e
 

Bit(s) to control rpmRunTransaction() operation.

Enumeration values:
RPMTRANS_FLAG_TEST   from --test
RPMTRANS_FLAG_BUILD_PROBS  
Todo:
Document.
RPMTRANS_FLAG_NOSCRIPTS   from --noscripts
RPMTRANS_FLAG_JUSTDB   from --justdb
RPMTRANS_FLAG_NOTRIGGERS   from --notriggers
RPMTRANS_FLAG_NODOCS   from --nodocs
RPMTRANS_FLAG_ALLFILES   from --allfiles
RPMTRANS_FLAG_KEEPOBSOLETE  
Todo:
Document.
RPMTRANS_FLAG_MULTILIB  
Todo:
Document.

Definition at line 970 of file rpmlib.h.


Function Documentation

int rpmCheckRpmlibProvides ( const char * keyName,
const char * keyEVR,
int keyFlags )
 

Check dependency against internal rpmlib feature provides.

Parameters:
keyName   dependency name string
keyEVR   dependency [epoch:]version[-release] string
keyFlags   dependency logical range qualifiers
Returns:
1 if dependency overlaps, 0 otherwise

Definition at line 49 of file rpmlibprov.c.

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

Return copy of rpmlib internal provides.

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

Definition at line 64 of file rpmlibprov.c.

int rpmRangesOverlap ( const char * AName,
const char * AEVR,
int AFlags,
const char * BName,
const char * BEVR,
int BFlags )
 

Compare two versioned dependency ranges, looking for overlap.

Parameters:
AName   1st dependncy name string
AEVR   1st dependency [epoch:]version[-release] string
AFlags   1st dependency logical range qualifiers
BName   2nd dependncy name string
BEVR   2nd dependency [epoch:]version[-release] string
BFlags   2nd dependency logical range qualifiers
Returns:
1 if dependencies overlap, 0 otherwise

Definition at line 524 of file depends.c.

Referenced by alSatisfiesDepend(), headerMatchesDepFlags(), rangeMatchesDepFlags(), and rpmCheckRpmlibProvides().

int rpmRunTransactions ( rpmTransactionSet ts,
rpmCallbackFunction notify,
rpmCallbackData notifyData,
rpmProblemSet okProbs,
rpmProblemSet * newProbs,
rpmtransFlags transFlags,
rpmprobFilterFlags ignoreSet )
 

Process all packages in transaction set.

Parameters:
ts   transaction set
notify   progress callback
notifyData   progress callback private data
okProbs   previously known problems (or NULL)
Return values:
newProbs   address to return unfiltered problems (or NULL)
Parameters:
transFlags   bits to control rpmRunTransactions()
ignoreSet   bits to filter problem types
Returns:
0 on success, -1 on error, >0 with newProbs set

Definition at line 1339 of file transaction.c.

int rpmdepCheck ( rpmTransactionSet ts,
struct rpmDependencyConflict ** conflicts,
int * numConflicts )
 

Check that all dependencies can be resolved.

Parameters:
ts   transaction set
Return values:
conflicts  
numConflicts  
Returns:
0 on success

Definition at line 1891 of file depends.c.

Referenced by checkSpec(), rpmErase(), rpmInstall(), rpmtransDepCheck(), and verifyDependencies().

void rpmdepFreeConflicts ( struct rpmDependencyConflict * conflicts,
int numConflicts )
 

Destroy dependency conflicts storage.

Parameters:
conflicts   dependency conflicts
numConflicts   no. of dependency conflicts

Definition at line 885 of file depends.c.

Referenced by checkSpec(), rpmErase(), rpmInstall(), rpmtransDepCheck(), and verifyDependencies().

int rpmdepOrder ( rpmTransactionSet ts )
 

Determine package order in a transaction set according to dependencies.

Order packages, returning error if circular dependencies cannot be eliminated by removing PreReq's from the loop(s). Only dependencies from added or removed packages are used to determine ordering using a topological sort (Knuth vol. 1, p. 262). Use rpmdepCheck() to verify that all dependencies can be reolved.

The order ends up as installed packages followed by removed packages, with packages removed for upgrades immediately following the new package to be installed.

The operation would be easier if we could sort the addedPackages array in the transaction set, but we store indexes into the array in various places.

Parameters:
ts   transaction set
Returns:
0 if packages are successfully ordered, 1 otherwise

Definition at line 1633 of file depends.c.

Referenced by rpmInstall(), and rpmtransOrder().

int rpmtransAddPackage ( rpmTransactionSet ts,
Header h,
FD_t fd,
const void * key,
int update,
rpmRelocation * relocs )
 

Add package to be installed to unordered transaction set.

If fd is NULL, the callback specified in rpmtransCreateSet() is used to open and close the file descriptor. If Header is NULL, the fd is always used, otherwise fd is only needed (and only opened) for actual package installation.

Parameters:
ts   transaction set
h   package header
fd   package file handle
key   package private data
update   is package being upgraded?
relocs   package file relocations
Returns:
0 on success, 1 on I/O error, 2 needs capabilities

Definition at line 753 of file depends.c.

Referenced by checkSpec(), rpmInstall(), rpmtransAdd(), and verifyDependencies().

void rpmtransAvailablePackage ( rpmTransactionSet ts,
Header h,
const void * key )
 

Add package to universe of possible packages to install in transaction set.

Parameters:
ts   transaction set
h   header
key   package private data

Definition at line 852 of file depends.c.

Referenced by rpmtransAdd().

rpmTransactionSet rpmtransCreateSet ( rpmdb rpmdb,
const char * rootdir )
 

Create an empty transaction set.

Parameters:
rpmdb   rpm database (may be NULL if database is not accessed)
rootdir   path to top of install tree
Returns:
transaction set

Definition at line 681 of file depends.c.

Referenced by checkSpec(), rpmErase(), rpmInstall(), rpmVerifyScript(), rpmtransCreate(), and verifyDependencies().

void rpmtransFree ( rpmTransactionSet ts )
 

Destroy transaction set.

Parameters:
ts   transaction set

Definition at line 864 of file depends.c.

Referenced by checkSpec(), rpmErase(), rpmInstall(), rpmVerifyScript(), rpmtransDealloc(), and verifyDependencies().

int rpmtransGetKeys ( const rpmTransactionSet ts,
const void *** ep,
int * nep )
 

Retrieve keys from ordered transaction set.

Todo:
Removed packages have no keys, returned as interleaved NULL pointers.
Parameters:
ts   transaction set
Return values:
ep   address of returned element array pointer (or NULL)
nep   address of no. of returned elements (or NULL)
Returns:
0 always

Definition at line 155 of file transaction.c.

void rpmtransRemovePackage ( rpmTransactionSet ts,
int dboffset )
 

Add package to be removed to unordered transaction set.

Parameters:
ts   transaction set
dboffset   rpm database instance

Definition at line 859 of file depends.c.

Referenced by rpmErase(), and rpmtransRemove().

void rpmtransSetScriptFd ( rpmTransactionSet ts,
FD_t fd )
 

Save file handle to be used as stderr when running package scripts.

Parameters:
ts   transaction set
fd   file handle

Definition at line 150 of file transaction.c.


Generated at Mon May 21 08:53:44 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001