rpm  4.16.1.2
Functions
RPM version API.

Rpm version comparison API. More...

Collaboration diagram for RPM version API.:

Functions

int rpmvercmp (const char *a, const char *b)
 Segmented string compare for version or release strings. More...
 
rpmver rpmverParse (const char *evr)
 Parse rpm version handle from evr string. More...
 
rpmver rpmverNew (const char *e, const char *v, const char *r)
 Create new rpm version handle from e, v, r components. More...
 
rpmver rpmverFree (rpmver rv)
 Free rpm version handle. More...
 
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)
 Compare two rpm version handles. More...
 
int rpmverOverlap (rpmver v1, rpmsenseFlags f1, rpmver v2, rpmsenseFlags f2)
 Determine whether two versioned ranges overlap. More...
 

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
a1st string
b2nd 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
v11st version handle
v22nd version handle
Returns
0 if equal, -1 if v1 smaller, 1 if greater, than v2

◆ rpmverE()

const char* rpmverE ( rpmver  rv)
Parameters
rvrpm version handle
Returns
epoch portion

◆ rpmverEVal()

uint32_t rpmverEVal ( rpmver  rv)
Parameters
rvrpm version handle
Returns
numerical value of epoch

◆ rpmverEVR()

char* rpmverEVR ( rpmver  rv)
Parameters
rvrpm version handle
Returns
formatted [E:]V[-R] string (malloced)

◆ rpmverFree()

rpmver rpmverFree ( rpmver  rv)

Free rpm version handle.

Parameters
rvrpm 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
eepoch (or NULL)
vversion
rrelease (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
v11st version
f11st sense flags
v22nd version
f22nd 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
rvrpm version handle
Returns
release portion

◆ rpmverV()

const char* rpmverV ( rpmver  rv)
Parameters
rvrpm version handle
Returns
version portion