# lib/problems.c File Reference

More...

`#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)
int | sameProblem (const rpmDependencyConflict ap, const rpmDependencyConflict bp)
void | printDepProblems (FILE *fp, const rpmDependencyConflict conflicts, int numConflicts)
| Print results of rpmdepCheck() dependency check.
int | vsnprintf (char *buf, int nb, const char *fmt, va_list ap)
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 _, rpmDependencyConflict_s::needsFlags, printDepFlags(), rpmDependencyConflict, sameProblem(), and rpmDependencyConflict_s::sense.

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(), rpmProblem, 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 rpmProblem_s::ignoreProblem, rpmProblemSet_s::numProblems, rpmProblemSet_s::probs, rpmProblem, rpmProblemPrint(), and rpmProblemSet.

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, rpmProblem, snprintf(), rpmProblem_s::str1, strerror(), rpmProblem_s::type, rpmProblem_s::ulong1, and xmalloc().

Referenced by rpmProblemPrint(), and rpmtransRun().

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, rpmDependencyConflict, and rpmDependencyConflict_s::sense. Referenced by printDepProblems().

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().

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

| Definition at line 93 of file problems.c.