lib/problems.c File Reference

#include "system.h"
#include <rpmlib.h>
#include "depends.h"
#include "misc.h"
#include "debug.h"

Go to the source code of this file.

Functions

void printDepFlags (FILE *fp, const char *version, int flags)
static int sameProblem (const rpmDependencyConflict ap, const rpmDependencyConflict bp)
void printDepProblems (FILE *fp, const rpmDependencyConflict conflicts, int numConflicts)
 Print results of rpmdepCheck() dependency check.
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 problem.
void rpmProblemPrint (FILE *fp, rpmProblem prob)
 Output formatted string representation of problem to file handle.
void rpmProblemSetPrint (FILE *fp, rpmProblemSet probs)
 Print problems to file handle.


Detailed Description

Definition in file problems.c.


Function Documentation

void printDepFlags ( FILE *  fp,
const char *  version,
int  flags 
)

Definition at line 19 of file problems.c.

References RPMSENSE_EQUAL, RPMSENSE_GREATER, and RPMSENSE_LESS.

Referenced by printDepProblems(), and rpmShowRpmlibProvides().

void printDepProblems ( FILE *  fp,
const rpmDependencyConflict  conflicts,
int  numConflicts 
)

Print results of rpmdepCheck() dependency check.

Parameters:
fp output file
conflicts dependency problems
numConflicts no. of dependency problems

Definition at line 61 of file problems.c.

References _, printDepFlags(), and sameProblem().

Referenced by checkSpec(), rpmErase(), rpmInstall(), and rpmRollback().

void rpmProblemPrint ( FILE *  fp,
rpmProblem  prob 
)

Output formatted string representation of problem to file handle.

Deprecated:
API: prob used to be passed by value, now passed by reference.
Parameters:
fp file handle
prob rpm problem

Definition at line 202 of file problems.c.

References _free(), and rpmProblemString().

Referenced by rpmProblemSetPrint().

void rpmProblemSetPrint ( FILE *  fp,
rpmProblemSet  probs 
)

Print problems to file handle.

Parameters:
fp file handle
probs problem set

Definition at line 209 of file problems.c.

References rpmProblemSet_s::numProblems, rpmProblemSet_s::probs, and rpmProblemPrint().

Referenced by rpmInstall(), and rpmRollback().

const char* rpmProblemString ( const rpmProblem  prob  ) 

Return formatted string representation of problem.

Deprecated:
API: prob used to be passed by value, now passed by reference.
Parameters:
prob rpm problem
Returns:
formatted string (malloc'd)

Definition at line 114 of file problems.c.

References _, rpmProblem_s::altNEVR, rpmProblem_s::pkgNEVR, RPMPROB_BADARCH, RPMPROB_BADOS, RPMPROB_BADPRETRANS, RPMPROB_BADRELOCATE, RPMPROB_CONFLICT, RPMPROB_DISKNODES, RPMPROB_DISKSPACE, RPMPROB_FILE_CONFLICT, RPMPROB_NEW_FILE_CONFLICT, RPMPROB_OLDPACKAGE, RPMPROB_PKG_INSTALLED, RPMPROB_REQUIRES, snprintf(), rpmProblem_s::str1, strerror(), rpmProblem_s::type, rpmProblem_s::ulong1, and xmalloc().

Referenced by rpmProblemPrint(), and rpmtransRun().

static int sameProblem ( const rpmDependencyConflict  ap,
const rpmDependencyConflict  bp 
) [static]

Definition at line 35 of file problems.c.

References rpmDependencyConflict_s::byName, rpmDependencyConflict_s::byRelease, rpmDependencyConflict_s::byVersion, rpmDependencyConflict_s::needsFlags, rpmDependencyConflict_s::needsName, rpmDependencyConflict_s::needsVersion, and rpmDependencyConflict_s::sense.

Referenced by printDepProblems().

static int snprintf ( char *  buf,
int  nb,
const char *  fmt,
  ... 
) [inline, static]

Definition at line 101 of file problems.c.

References vsnprintf().

Referenced by rpmInitDB(), rpmOpenDB(), and rpmProblemString().

static int vsnprintf ( char *  buf,
int  nb,
const char *  fmt,
va_list  ap 
) [inline, static]

Definition at line 93 of file problems.c.

Referenced by snprintf(), and vrpmlog().


Generated on Wed Nov 15 03:38:12 2006 for rpm by  doxygen 1.4.7