rpm
5.2.1
|
Structures and prototypes used for an "rpmps" problem set. More...
Go to the source code of this file.
Defines | |
#define | rpmpsUnlink(_ps, _msg) ((rpmps)rpmioUnlinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__)) |
#define | rpmpsLink(_ps, _msg) ((rpmps)rpmioLinkPoolItem((rpmioItem)(_ps), _msg, __FILE__, __LINE__)) |
Typedefs | |
typedef struct rpmProblem_s * | rpmProblem |
Raw data for an element of a problem set. | |
typedef struct rpmps_s * | rpmps |
Transaction problems found while processing a transaction set/. | |
typedef struct rpmpsi_s * | rpmpsi |
typedef enum rpmprobFilterFlags_e | rpmprobFilterFlags |
typedef enum rpmProblemType_e | rpmProblemType |
Enumerate transaction set problem types. | |
Enumerations | |
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 | rpmProblemType_e { RPMPROB_BADARCH, RPMPROB_BADOS, RPMPROB_PKG_INSTALLED, RPMPROB_BADRELOCATE, RPMPROB_REQUIRES, RPMPROB_CONFLICT, RPMPROB_NEW_FILE_CONFLICT, RPMPROB_FILE_CONFLICT, RPMPROB_OLDPACKAGE, RPMPROB_DISKSPACE, RPMPROB_DISKNODES, RPMPROB_RDONLY, RPMPROB_BADPRETRANS, RPMPROB_BADPLATFORM, RPMPROB_NOREPACKAGE } |
Enumerate transaction set problem types. More... | |
Functions | |
const char * | rpmProblemString (const rpmProblem prob) |
Return formatted string representation of a problem. | |
rpmps | rpmpsUnlink (rpmps ps, const char *msg) |
Unreference a problem set instance. | |
rpmps | rpmpsLink (rpmps ps, const char *msg) |
Reference a problem set instance. | |
int | rpmpsNumProblems (rpmps ps) |
Return number of problems in set. | |
rpmpsi | rpmpsInitIterator (rpmps ps) |
Initialize problem set iterator. | |
rpmpsi | rpmpsFreeIterator (rpmpsi psi) |
Destroy problem set iterator. | |
int | rpmpsNextIterator (rpmpsi psi) |
Return next problem set iterator index. | |
rpmProblem | rpmpsProblem (rpmpsi psi) |
Return current problem from problem set. | |
rpmps | rpmpsCreate (void) |
Create a problem set. | |
rpmps | rpmpsFree (rpmps ps) |
Destroy a problem set. | |
void | rpmpsPrint (FILE *fp, rpmps ps) |
Print problems to file handle. | |
void | rpmpsAppend (rpmps ps, rpmProblemType type, const char *pkgNEVR, fnpyKey key, const char *dn, const char *bn, const char *altNEVR, rpmuint64_t ulong1) |
Append a problem to current set of problems. | |
int | rpmpsTrim (rpmps ps, rpmps filter) |
Filter a problem set. | |
rpmProblem | rpmpsGetProblem (rpmps ps, int num) |
Return a problem from problem set. | |
char * | rpmProblemGetPkgNEVR (rpmProblem prob) |
Return the package NEVR causing the problem. | |
char * | rpmProblemGetAltNEVR (rpmProblem prob) |
Return the second package NEVR causing the problem. | |
char * | rpmProblemGetStr (rpmProblem prob) |
Return a generic data string from a problem. | |
rpmuint64_t | rpmProblemGetDiskNeed (rpmProblem prob) |
Return generic pointer/long attribute from a problem. | |
rpmProblemType | rpmProblemGetType (rpmProblem prob) |
Return the problem type. | |
fnpyKey | rpmProblemKey (rpmProblem prob) |
Return the transaction key causing the problem. | |
Variables | |
int | _rpmps_debug |
Structures and prototypes used for an "rpmps" problem set.
Definition in file rpmps.h.
typedef enum rpmprobFilterFlags_e rpmprobFilterFlags |
typedef struct rpmProblem_s* rpmProblem |
typedef enum rpmProblemType_e rpmProblemType |
Enumerate transaction set problem types.
typedef struct rpmps_s* rpmps |
enum rpmprobFilterFlags_e |
enum rpmProblemType_e |
Enumerate transaction set problem types.
char* rpmProblemGetAltNEVR | ( | rpmProblem | prob | ) |
Return the second package NEVR causing the problem.
prob | rpm problem |
Definition at line 408 of file rpmps.c.
Referenced by rpmts_Check(), and verifyDependencies().
rpmuint64_t rpmProblemGetDiskNeed | ( | rpmProblem | prob | ) |
Return generic pointer/long attribute from a problem.
prob | rpm problem |
Definition at line 418 of file rpmps.c.
Referenced by rpmts_Run().
char* rpmProblemGetPkgNEVR | ( | rpmProblem | prob | ) |
Return the package NEVR causing the problem.
prob | rpm problem |
Definition at line 403 of file rpmps.c.
Referenced by rpmts_Check(), and verifyDependencies().
char* rpmProblemGetStr | ( | rpmProblem | prob | ) |
Return a generic data string from a problem.
prob | rpm problem |
Definition at line 413 of file rpmps.c.
Referenced by rpmts_Run().
rpmProblemType rpmProblemGetType | ( | rpmProblem | prob | ) |
Return the problem type.
prob | rpm problem |
Definition at line 423 of file rpmps.c.
Referenced by rpmts_Check(), and rpmts_Run().
fnpyKey rpmProblemKey | ( | rpmProblem | prob | ) |
Return the transaction key causing the problem.
prob | rpm problem |
Definition at line 428 of file rpmps.c.
Referenced by rpmts_Check().
const char* rpmProblemString | ( | const rpmProblem | prob | ) |
Return formatted string representation of a problem.
prob | rpm problem |
Definition at line 236 of file rpmps.c.
References _, N_, RPMPROB_BADPLATFORM, RPMPROB_BADPRETRANS, RPMPROB_BADRELOCATE, RPMPROB_CONFLICT, RPMPROB_DISKNODES, RPMPROB_DISKSPACE, RPMPROB_FILE_CONFLICT, RPMPROB_NEW_FILE_CONFLICT, RPMPROB_NOREPACKAGE, RPMPROB_OLDPACKAGE, RPMPROB_PKG_INSTALLED, RPMPROB_RDONLY, RPMPROB_REQUIRES, snprintf(), and xmalloc().
Referenced by rpmps_iternext(), rpmps_subscript(), rpmpsPrint(), rpmts_Run(), and rpmtsAddInstallElement().
void rpmpsAppend | ( | rpmps | ps, |
rpmProblemType | type, | ||
const char * | pkgNEVR, | ||
fnpyKey | key, | ||
const char * | dn, | ||
const char * | bn, | ||
const char * | altNEVR, | ||
rpmuint64_t | ulong1 | ||
) |
Append a problem to current set of problems.
ps | problem set |
type | type of problem |
pkgNEVR | package name |
key | filename or python object address |
dn | directory name |
bn | file base name |
altNEVR | related (e.g. through a dependency) package name |
ulong1 | generic pointer/long attribute |
Definition at line 128 of file rpmps.c.
References stpcpy(), xcalloc(), xrealloc(), and xstrdup().
Referenced by cmpArgvStr(), ensureOlder(), handleInstInstalledFiles(), handleOverlappedFiles(), relocateFileList(), rpmps_Append(), rpmps_ass_sub(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), and rpmtsRun().
rpmps rpmpsCreate | ( | void | ) |
Create a problem set.
Definition at line 93 of file rpmps.c.
References rpmpsGetPool(), and rpmpsLink().
Referenced by rpmps_init(), and rpmtsProblems().
Destroy a problem set.
ps | problem set |
Definition at line 103 of file rpmps.c.
References _free(), _rpmps_debug, L, and rpmioPutPool().
Referenced by checkPackageDeps(), cmpArgvStr(), ensureOlder(), handleInstInstalledFiles(), handleOverlappedFiles(), relocateFileList(), rpmcliInstallProblems(), rpmgiNext(), rpmps_dealloc(), rpmps_free(), rpmRollback(), rpmts_Check(), rpmts_Run(), rpmtsAddInstallElement(), rpmtsCheck(), rpmtsCheckDSIProblems(), rpmtsClean(), rpmtsRun(), and verifyDependencies().
Destroy problem set iterator.
psi | problem set iterator |
Definition at line 61 of file rpmps.c.
References _free(), and rpmpsUnlink().
Referenced by rpmps_iternext(), rpmps_subscript(), rpmpsPrint(), rpmts_Check(), rpmts_Run(), and verifyDependencies().
rpmProblem rpmpsGetProblem | ( | rpmps | ps, |
int | num | ||
) |
Return a problem from problem set.
ps | problem set |
num | problem number (<0 is last problem) |
Definition at line 391 of file rpmps.c.
Referenced by rpmtsAddInstallElement().
Initialize problem set iterator.
ps | problem set |
Definition at line 48 of file rpmps.c.
References rpmpsLink(), and xcalloc().
Referenced by rpmps_iter(), rpmps_iternext(), rpmps_subscript(), rpmpsPrint(), rpmts_Check(), rpmts_Run(), and verifyDependencies().
Reference a problem set instance.
ps | transaction set |
msg |
Referenced by rpmpsCreate(), rpmpsInitIterator(), and rpmtsProblems().
int rpmpsNextIterator | ( | rpmpsi | psi | ) |
Return next problem set iterator index.
psi | problem set iterator |
Definition at line 70 of file rpmps.c.
References rpmpsNumProblems().
Referenced by rpmps_iternext(), rpmps_subscript(), rpmpsPrint(), rpmts_Check(), rpmts_Run(), and verifyDependencies().
int rpmpsNumProblems | ( | rpmps | ps | ) |
Return number of problems in set.
ps | problem set |
Definition at line 40 of file rpmps.c.
Referenced by rpmcliInstallProblems(), rpmgiNext(), rpmps_length(), rpmpsNextIterator(), rpmpsProblem(), rpmtsCheck(), rpmtsRun(), and verifyDependencies().
void rpmpsPrint | ( | FILE * | fp, |
rpmps | ps | ||
) |
Print problems to file handle.
fp | file handle (NULL uses stderr) |
ps | problem set |
Definition at line 351 of file rpmps.c.
References _free(), rpmProblemString(), rpmpsFreeIterator(), rpmpsInitIterator(), rpmpsNextIterator(), rpmpsProblem(), and sameProblem().
Referenced by rpmcliInstallProblems(), rpmgiNext(), and rpmps_print().
rpmProblem rpmpsProblem | ( | rpmpsi | psi | ) |
Return current problem from problem set.
psi | problem set iterator |
Definition at line 84 of file rpmps.c.
References rpmpsNumProblems().
Referenced by rpmps_iternext(), rpmps_subscript(), rpmpsPrint(), rpmts_Check(), rpmts_Run(), and verifyDependencies().
Filter a problem set.
As the problem sets are generated in an order solely dependent on the ordering of the packages in the transaction, and that ordering can't be changed, the problem sets must be parallel to one another. Additionally, the filter set must be a subset of the target set, given the operations available on transaction set. This is good, as it lets us perform this trim in linear time, rather then logarithmic or quadratic.
ps | problem set |
filter | problem filter (or NULL) |
Definition at line 171 of file rpmps.c.
References XSTRCMP.
Referenced by rpmtsRun().
Unreference a problem set instance.
ps | problem set |
msg |
Referenced by rpmpsFreeIterator().
int _rpmps_debug |