Main Page Modules Data Structures File List Data Fields Globals Related Pages

# lib/rpmps.h File Reference

Structures and prototypes used for an "rpmps" problem set. More...

Go to the source code of this file.

## Data Structures
struct | rpmProblem_s
struct | rpmps_s
## Defines
#define | rpmpsUnlink(_ps, _msg) XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
#define | rpmpsLink(_ps, _msg) XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
## Typedefs
typedef rpmProblem_s * | rpmProblem
| Raw data for an element of a problem set. More...
typedef rpmps_s * | rpmps
| Transaction problems found while processing a transaction set/. More...
typedef enum rpmProblemType_e | rpmProblemType
| Enumerate transaction set problem types. More...
## Enumerations
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_BADPRETRANS }
| Enumerate transaction set problem types. More...
## Functions
const char * | rpmProblemString (const rpmProblem prob)
| Return formatted string representation of a problem. More...
rpmps | rpmpsUnlink (rpmps ps, const char *msg)
| Unreference a problem set instance. More...
rpmps | XrpmpsUnlink (rpmps ps, const char *msg, const char *fn, unsigned ln)
rpmps | rpmpsLink (rpmps ps, const char *msg)
| Reference a problem set instance. More...
rpmps | XrpmpsLink (rpmps ps, const char *msg, const char *fn, unsigned ln)
int | rpmpsNumProblems (rpmps ps)
| Return number of problems in set. More...
rpmps | rpmpsCreate (void)
| Create a problem set. More...
rpmps | rpmpsFree (rpmps ps)
| Destroy a problem set. More...
void | rpmpsPrint (FILE *fp, rpmps ps)
| Print problems to file handle. More...
void | rpmpsAppend (rpmps ps, rpmProblemType type, const char *pkgNEVR, fnpyKey key, const char *dn, const char *bn, const char *altNEVR, unsigned long ulong1)
| Append a problem to current set of problems. More...
int | rpmpsTrim (rpmps ps, rpmps filter)
| Filter a problem set. More...
## Variables
int | _rpmps_debug

## Detailed Description

Structures and prototypes used for an "rpmps" problem set.

Definition in file rpmps.h.

## Define Documentation

#define rpmpsLink | ( | _ps,
|  | _msg |  | ) | XrpmpsLink(_ps, _msg, __FILE__, __LINE__)

| Definition at line 118 of file rpmps.h. Referenced by rpmpsCreate, and rpmtsProblems.

#define rpmpsUnlink | ( | _ps,
|  | _msg |  | ) | XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)

| Definition at line 101 of file rpmps.h. Referenced by rpmpsFree.

## Typedef Documentation

typedef struct rpmProblem_s* rpmProblem

| Raw data for an element of a problem set. Definition at line 17 of file rpmps.h.

typedef enum rpmProblemType_e rpmProblemType

| Enumerate transaction set problem types. Referenced by rpmdsProblem, and rpmpsAppend.

typedef struct rpmps_s* rpmps

| Transaction problems found while processing a transaction set/. Definition at line 22 of file rpmps.h.

## Enumeration Type Documentation

enum rpmProblemType_e

  | Enumerate transaction set problem types. Enumeration values:
  RPMPROB_BADARCH | package ... is for a different architecture
  RPMPROB_BADOS | package ... is for a different operating system
  RPMPROB_PKG_INSTALLED | package ... is already installed
  RPMPROB_BADRELOCATE | path ... is not relocateable for package ...
  RPMPROB_REQUIRES | package ... has unsatisfied Requires: ...
  RPMPROB_CONFLICT | package ... has unsatisfied Conflicts: ...
  RPMPROB_NEW_FILE_CONFLICT | file ... conflicts between attemped installs of ...
  RPMPROB_FILE_CONFLICT | file ... from install of ... conflicts with file from package ...
  RPMPROB_OLDPACKAGE | package ... (which is newer than ...) is already installed
  RPMPROB_DISKSPACE | installing package ... needs ... on the ... filesystem
  RPMPROB_DISKNODES | installing package ... needs ... on the ... filesystem
  RPMPROB_BADPRETRANS | (unimplemented)
Definition at line 27 of file rpmps.h.

## Function Documentation

const char* rpmProblemString | ( | const rpmProblem | prob | ) |

  | Return formatted string representation of a problem. Parameters:
  prob | rpm problem
Returns: formatted string (malloc'd) Definition at line 193 of file rpmps.c. Referenced by rpmpsPrint, and rpmts_Run.

void rpmpsAppend | ( | rpmps | ps,
|  | rpmProblemType | type,
|  | const char * | pkgNEVR,
|  | fnpyKey | key,
|  | const char * | dn,
|  | const char * | bn,
|  | const char * | altNEVR,
|  | unsigned long | ulong1
| ) |

  | Append a problem to current set of problems. Parameters:
  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 81 of file rpmps.c. Referenced by rpmdsProblem, and rpmtsCheckDSIProblems.

rpmps rpmpsCreate | ( | void |  | ) |

| Create a problem set. Returns: new problem set Definition at line 54 of file rpmps.c. References rpmProblem_s::str1.

rpmps rpmpsFree | ( | rpmps | ps | ) |

  | Destroy a problem set. Parameters:
  ps | problem set
Returns: NULL always Definition at line 60 of file rpmps.c. Referenced by checkSpec, rpmErase, rpmGraph, rpmInstall, rpmRollback, rpmts_Check, rpmts_Run, rpmtsCheck, rpmtsCheckDSIProblems, rpmtsClean, and verifyDependencies.

rpmps rpmpsLink | ( | rpmps | ps,
|  | const char * | msg
| ) |

  | Reference a problem set instance. Parameters:
  ps | transaction set
  msg |
Returns: new transaction set reference

int rpmpsNumProblems | ( | rpmps | ps | ) |

  | Return number of problems in set. Parameters:
  ps | problem set
Returns: number of problems Definition at line 46 of file rpmps.c. References rpmProblem_s::pkgNEVR. Referenced by checkSpec, rpmErase, rpmGraph, rpmInstall, rpmRollback, and verifyDependencies.

void rpmpsPrint | ( | FILE * | fp,
|  | rpmps | ps
| ) |

  | Print problems to file handle. Parameters:
  fp | file handle (NULL uses stderr)
  ps | problem set
Definition at line 303 of file rpmps.c. Referenced by checkSpec, rpmErase, rpmGraph, rpmInstall, and rpmRollback.

int rpmpsTrim | ( | rpmps | ps,
|  | rpmps | filter
| ) |

  | 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. Parameters:
  ps | problem set
  filter | problem filter (or NULL)
Returns: 0 no problems, 1 if problems remain Definition at line 128 of file rpmps.c.

rpmps rpmpsUnlink | ( | rpmps | ps,
|  | const char * | msg
| ) |

  | Unreference a problem set instance. Parameters:
  ps | problem set
  msg |
Returns: problem set

rpmps XrpmpsLink | ( | rpmps | ps,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |

| Todo: Remove debugging entry from the ABI. Definition at line 33 of file rpmps.c. References RPMPROB_BADPRETRANS, RPMPROB_CONFLICT, RPMPROB_DISKNODES, RPMPROB_DISKSPACE, RPMPROB_FILE_CONFLICT, RPMPROB_NEW_FILE_CONFLICT, and RPMPROB_OLDPACKAGE.

rpmps XrpmpsUnlink | ( | rpmps | ps,
|  | const char * | msg,
|  | const char * | fn,
|  | unsigned | ln
| ) |

| Todo: Remove debugging entry from the ABI. Definition at line 20 of file rpmps.c.

## Variable Documentation

int _rpmps_debug

| Definition at line 11 of file rpmps.h.