rpm
5.4.14
|
#include "system.h"
#include <rpmio.h>
#include <rpmiotypes.h>
#include <rpmtypes.h>
#include "rpmps.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMPS_INTERNAL |
#define | XSTRCMP(a, b) ((!(a) && !(b)) || ((a) && (b) && !strcmp((a), (b)))) |
Functions | |
static void | rpmpsFini (void *_ps) |
static rpmps | rpmpsGetPool (rpmioPool pool) |
rpmps | rpmpsCreate (void) |
Create a problem set. More... | |
int | rpmpsNumProblems (rpmps ps) |
Return number of problems in set. More... | |
rpmpsi | rpmpsInitIterator (rpmps ps) |
Initialize problem set iterator. More... | |
rpmpsi | rpmpsFreeIterator (rpmpsi psi) |
Destroy problem set iterator. More... | |
int | rpmpsNextIterator (rpmpsi psi) |
Return next problem set iterator index. More... | |
rpmProblem | rpmpsProblem (rpmpsi psi) |
Return current problem from problem set. More... | |
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. More... | |
int | rpmpsTrim (rpmps ps, rpmps filter) |
Filter a problem set. More... | |
static int | vsnprintf (char *buf, int nb, const char *fmt, va_list ap) |
static int | snprintf (char *buf, int nb, const char *fmt,...) |
const char * | rpmProblemString (const rpmProblem prob) |
Return formatted string representation of a problem. More... | |
static int | sameProblem (const rpmProblem ap, const rpmProblem bp) |
void | rpmpsPrint (FILE *fp, rpmps ps) |
Print problems to file handle. More... | |
rpmProblem | rpmpsGetProblem (rpmps ps, int num) |
Return a problem from problem set. More... | |
char * | rpmProblemGetPkgNEVR (rpmProblem prob) |
Return the package NEVR causing the problem. More... | |
char * | rpmProblemGetAltNEVR (rpmProblem prob) |
Return the second package NEVR causing the problem. More... | |
char * | rpmProblemGetStr (rpmProblem prob) |
Return a generic data string from a problem. More... | |
rpmuint64_t | rpmProblemGetDiskNeed (rpmProblem prob) |
Return generic pointer/long attribute from a problem. More... | |
rpmProblemType | rpmProblemGetType (rpmProblem prob) |
Return the problem type. More... | |
fnpyKey | rpmProblemKey (rpmProblem prob) |
Return the transaction key causing the problem. More... | |
Variables | |
int | _rpmps_debug = 0 |
rpmioPool | _rpmpsPool |
Definition at line 164 of file rpmps.c.
Referenced by rpmpsTrim().
char* rpmProblemGetAltNEVR | ( | rpmProblem | prob | ) |
Return the second package NEVR causing the problem.
prob | rpm problem |
Definition at line 403 of file rpmps.c.
Referenced by if(), and verifyDependencies().
rpmuint64_t rpmProblemGetDiskNeed | ( | rpmProblem | prob | ) |
char* rpmProblemGetPkgNEVR | ( | rpmProblem | prob | ) |
Return the package NEVR causing the problem.
prob | rpm problem |
Definition at line 398 of file rpmps.c.
Referenced by if(), and verifyDependencies().
char* rpmProblemGetStr | ( | rpmProblem | prob | ) |
rpmProblemType rpmProblemGetType | ( | rpmProblem | prob | ) |
fnpyKey rpmProblemKey | ( | rpmProblem | prob | ) |
const char* rpmProblemString | ( | const rpmProblem | prob | ) |
Return formatted string representation of a problem.
prob | rpm problem |
Definition at line 231 of file rpmps.c.
References _, altNEVR, buf, N_, nb, pkgNEVR, rc, 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(), str1, and xmalloc.
Referenced by rpmpsPrint(), rpmtsAddInstallElement(), and while().
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 123 of file rpmps.c.
References key, memset(), NULL, p, stpcpy(), t, type, ulong1, xcalloc(), xrealloc, and xstrdup().
Referenced by cmpArgvStr(), ensureOlder(), handleInstInstalledFile(), handleOverlappedFiles(), if(), relocateFileList(), rpmdsProblem(), rpmps_Append(), rpmps_push(), rpmtsAddInstallElement(), rpmtsCheckDSIProblems(), and rpmtsSanityCheck().
Create a problem set.
Definition at line 61 of file rpmps.c.
References NULL, ps, rpmpsGetPool(), and rpmpsLink().
Referenced by rpmps_alloc(), rpmps_init(), and rpmtsProblems().
Destroy problem set iterator.
psi | problem set iterator |
Definition at line 91 of file rpmps.c.
References _free(), NULL, and rpmpsUnlink().
Referenced by if(), rpmpsPrint(), rpmtsSanityCheck(), and verifyDependencies().
Definition at line 47 of file rpmps.c.
References _rpmpsPool, NULL, ps, rpmioGetPool(), rpmioNewPool(), and rpmpsFini().
Referenced by rpmpsCreate().
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 386 of file rpmps.c.
References NULL.
Referenced by rpmtsAddInstallElement(), and rpmtsSanityCheck().
Initialize problem set iterator.
ps | problem set |
Definition at line 78 of file rpmps.c.
References NULL, psi, rpmpsLink(), and xcalloc().
Referenced by if(), rpmpsPrint(), rpmtsSanityCheck(), and verifyDependencies().
Return next problem set iterator index.
psi | problem set iterator |
Definition at line 100 of file rpmps.c.
References i, NULL, and rpmpsNumProblems().
Referenced by if(), rpmpsPrint(), rpmtsSanityCheck(), and verifyDependencies().
Return number of problems in set.
ps | problem set |
Definition at line 70 of file rpmps.c.
Referenced by _rpmtsCheck(), _rpmtsRun(), rpmcliInstallProblems(), rpmps_length_get(), rpmps_print(), rpmps_push(), rpmpsNextIterator(), rpmpsProblem(), and verifyDependencies().
Print problems to file handle.
fp | file handle (NULL uses stderr) |
ps | problem set |
Definition at line 346 of file rpmps.c.
References _free(), fprintf(), i, j, msg, NULL, p, psi, rpmProblemString(), rpmpsFreeIterator(), rpmpsInitIterator(), rpmpsNextIterator(), rpmpsProblem(), and sameProblem().
Referenced by rpmcliInstallProblems(), and rpmps_print().
rpmProblem rpmpsProblem | ( | rpmpsi | psi | ) |
Return current problem from problem set.
psi | problem set iterator |
Definition at line 114 of file rpmps.c.
References NULL, p, and rpmpsNumProblems().
Referenced by if(), rpmpsPrint(), verifyDependencies(), and while().
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 166 of file rpmps.c.
References f, NULL, t, and XSTRCMP.
Referenced by _rpmtsRun().
|
static |
Definition at line 220 of file rpmps.c.
References rc, and vsnprintf().
Referenced by _tagName(), arHeaderWrite(), doSetupMacro(), FDGsqlTag(), formatValue(), genSourceRpmName(), headerCheck(), i18nTag(), jsonFormat(), pgpsigFormat(), PRCOsqlTag(), prepFetchVerbose(), processSourceFiles(), rdLead(), rdSignature(), rpmdcPrintZeroInstall(), rpmfcHelper(), rpmkuFindPubkey(), rpmkuStorePubkey(), rpmProblemString(), rpmpsmStage(), rpmReadHeader(), rpmrepoMDExpand(), rpmrepoOpenMDFile(), shescapeFormat(), statFormat(), tblName(), xmlFormat(), and yamlFormat().
Definition at line 212 of file rpmps.c.
Referenced by snprintf().
int _rpmps_debug = 0 |
Definition at line 26 of file rpmps.c.
Referenced by if(), rpmps_alloc(), rpmps_Debug(), rpmps_free(), rpmps_getattro(), rpmps_init(), rpmps_new(), rpmps_setattro(), and while().
rpmioPool _rpmpsPool |
Definition at line 45 of file rpmps.c.
Referenced by rpmpsGetPool().