rpm 4.19.1.1 The RPM Package Manager

Loading...
Searching...
No Matches
Files | Typedefs | Enumerations | Functions
Problem Element API.
(un)Installing packages:

Problem Element API. More...

## Files
file | rpmprob.h

## Typedefs
typedef enum rpmProblemType_e | rpmProblemType

## 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) , RPMPROB_FILTER_VERIFY = (1 << 9) }
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_OBSOLETES , RPMPROB_VERIFY }

## Functions
rpmProblem | rpmProblemCreate (rpmProblemType type, const char *pkgNEVR, fnpyKey key, const char *altNEVR, const char *str, uint64_t number)
rpmProblem | rpmProblemFree (rpmProblem prob)
rpmProblem | rpmProblemLink (rpmProblem prob)
int | rpmProblemCompare (rpmProblem ap, rpmProblem bp)
const char * | rpmProblemGetPkgNEVR (rpmProblem prob)
const char * | rpmProblemGetAltNEVR (rpmProblem prob)
rpmProblemType | rpmProblemGetType (rpmProblem prob)
fnpyKey | rpmProblemGetKey (rpmProblem prob)
const char * | rpmProblemGetStr (rpmProblem prob)
rpm_loff_t | rpmProblemGetDiskNeed (rpmProblem prob)
char * | rpmProblemString (rpmProblem prob)

## Detailed Description

Problem Element API.

## Typedef Documentation

## ◆ rpmProblemType

typedef enum rpmProblemType_e rpmProblemType

Enumerate transaction set problem types.

## Enumeration Type Documentation

## ◆ rpmprobFilterFlags_e

enum rpmprobFilterFlags_e

Todo
  Generalize filter mechanism.

Enumerator
RPMPROB_FILTER_IGNOREOS | from –ignoreos
RPMPROB_FILTER_IGNOREARCH | from –ignorearch
RPMPROB_FILTER_REPLACEPKG | from –replacepkgs
RPMPROB_FILTER_FORCERELOCATE | from –badreloc
RPMPROB_FILTER_REPLACENEWFILES | from –replacefiles
RPMPROB_FILTER_REPLACEOLDFILES | from –replacefiles
RPMPROB_FILTER_OLDPACKAGE | from –oldpackage
RPMPROB_FILTER_DISKSPACE | from –ignoresize
RPMPROB_FILTER_DISKNODES | from –ignoresize
RPMPROB_FILTER_VERIFY | from –noverify

## ◆ rpmProblemType_e

enum rpmProblemType_e

Enumerate transaction set problem types.

Enumerator
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 relocatable for package ...
RPMPROB_REQUIRES | package ... has unsatisfied Requires: ...
RPMPROB_CONFLICT | package ... has unsatisfied Conflicts: ...
RPMPROB_NEW_FILE_CONFLICT | file ... conflicts between attempted 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_OBSOLETES | package ... is obsoleted by ...
RPMPROB_VERIFY | package did not pass verification

## Function Documentation

## ◆ rpmProblemCompare()

int rpmProblemCompare | ( | rpmProblem | ap,
|  | rpmProblem | bp )

Compare two problems for equality.

Parameters

  ap | 1st problem
  bp | 2nd problem

Returns
  1 if the problems differ, 0 otherwise

## ◆ rpmProblemCreate()

rpmProblem rpmProblemCreate | ( | rpmProblemType | type,
|  | const char * | pkgNEVR,
|  | fnpyKey | key,
|  | const char * | altNEVR,
|  | const char * | str,
|  | uint64_t | number )

Create a problem item.

Parameters

  type | type of problem
  pkgNEVR | package name
  key | filename or python object address
  altNEVR | related (e.g. through a dependency) package name
  str | generic string attribute
  number | generic number attribute

Returns
  rpmProblem

## ◆ rpmProblemFree()

rpmProblem rpmProblemFree | ( | rpmProblem | prob | ) |

Destroy a problem item.

Parameters

  prob | rpm problem

Returns
  rpm problem (NULL)

## ◆ rpmProblemGetAltNEVR()

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

Return related (e.g. through a dependency) package NEVR

Parameters

  prob | rpm problem

Returns
  related (e.g. through a dependency) package NEVR

## ◆ rpmProblemGetDiskNeed()

rpm_loff_t rpmProblemGetDiskNeed | ( | rpmProblem | prob | ) |

Return disk requirement (needed disk space / number of inodes) depending on problem type. On problem types other than RPMPROB_DISKSPACE and RPMPROB_DISKNODES return value is undefined.

Parameters

  prob | rpm problem

Returns
  disk requirement

## ◆ rpmProblemGetKey()

fnpyKey rpmProblemGetKey | ( | rpmProblem | prob | ) |

Return filename or python object address of a problem

Parameters

  prob | rpm problem

Returns
  filename or python object address

## ◆ rpmProblemGetPkgNEVR()

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

Return package NEVR

Parameters

  prob | rpm problem

Returns
  package NEVR

## ◆ rpmProblemGetStr()

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

Return a generic data string from a problem

Parameters

  prob | rpm problem

Returns
  a generic data string

Todo
  needs a better name

## ◆ rpmProblemGetType()

rpmProblemType rpmProblemGetType | ( | rpmProblem | prob | ) |

Return type of problem (dependency, diskpace etc)

Parameters

  prob | rpm problem

Returns
  type of problem

## ◆ rpmProblemLink()

rpmProblem rpmProblemLink | ( | rpmProblem | prob | ) |

Reference an rpmProblem instance

Parameters

  prob | rpm problem

Returns
  rpm problem

## ◆ rpmProblemString()

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

Return formatted string representation of a problem.

Parameters

  prob | rpm problem

Returns
  formatted string (malloc'd)