rpm 4.19.1.1 The RPM Package Manager

Loading...
Searching...
No Matches
Functions
RPM version API.
Data types:

Rpm version comparison API. More...

Collaboration diagram for RPM version API.:

## Functions
int | rpmvercmp (const char *a, const char *b)
rpmver | rpmverParse (const char *evr)
rpmver | rpmverNew (const char *e, const char *v, const char *r)
rpmver | rpmverFree (rpmver rv)
uint32_t | rpmverEVal (rpmver rv)
const char * | rpmverE (rpmver rv)
const char * | rpmverV (rpmver rv)
const char * | rpmverR (rpmver rv)
char * | rpmverEVR (rpmver rv)
int | rpmverCmp (rpmver v1, rpmver v2)
int | rpmverOverlap (rpmver v1, rpmsenseFlags f1, rpmver v2, rpmsenseFlags f2)

## Detailed Description

Rpm version comparison API.

## Function Documentation

## ◆ rpmvercmp()

int rpmvercmp | ( | const char * | a,
|  | const char * | b
| ) |  |

Segmented string compare for version or release strings.

Parameters

  a | 1st string
  b | 2nd string

Returns
  +1 if a is "newer", 0 if equal, -1 if b is "newer"

## ◆ rpmverCmp()

int rpmverCmp | ( | rpmver | v1,
|  | rpmver | v2
| ) |  |

Compare two rpm version handles

Parameters

  v1 | 1st version handle
  v2 | 2nd version handle

Returns
  0 if equal, -1 if v1 smaller, 1 if greater, than v2

## ◆ rpmverE()

const char * rpmverE | ( | rpmver | rv | ) |

Parameters

  rv | rpm version handle

Returns
  epoch portion

## ◆ rpmverEVal()

uint32_t rpmverEVal | ( | rpmver | rv | ) |

Parameters

  rv | rpm version handle

Returns
  numerical value of epoch

## ◆ rpmverEVR()

char * rpmverEVR | ( | rpmver | rv | ) |

Parameters

  rv | rpm version handle

Returns
  formatted [E:]V[-R] string (malloced)

## ◆ rpmverFree()

rpmver rpmverFree | ( | rpmver | rv | ) |

Free rpm version handle

Parameters

  rv | rpm version handle

Returns
  NULL always

## ◆ rpmverNew()

rpmver rpmverNew | ( | const char * | e,
|  | const char * | v,
|  | const char * | r
| ) |  |

Create new rpm version handle from e, v, r components

Parameters

  e | epoch (or NULL)
  v | version
  r | release (or NULL)

Returns
  rpm version, NULL on invalid

## ◆ rpmverOverlap()

int rpmverOverlap | ( | rpmver | v1,
|  | rpmsenseFlags | f1,
|  | rpmver | v2,
|  | rpmsenseFlags | f2
| ) |  |

Determine whether two versioned ranges overlap.

Parameters

  v1 | 1st version
  f1 | 1st sense flags
  v2 | 2nd version
  f2 | 2nd sense flags

Returns
  1 if ranges overlap, 0 otherwise

## ◆ rpmverParse()

rpmver rpmverParse | ( | const char * | evr | ) |

Parse rpm version handle from evr string

Parameters

  evr | [epoch:]version[-release] string

Returns
  rpm version, NULL on invalid evr

## ◆ rpmverR()

const char * rpmverR | ( | rpmver | rv | ) |

Parameters

  rv | rpm version handle

Returns
  release portion

## ◆ rpmverV()

const char * rpmverV | ( | rpmver | rv | ) |

Parameters

  rv | rpm version handle

Returns
  version portion