rpm  5.4.10
Macros | Typedefs | Enumerations | Functions | Variables
rpmevr.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RPMSENSE_SENSEMASK   (RPMSENSE_EQUAL | RPMSENSE_GREATER | RPMSENSE_LESS)
 
#define RPMSENSE_NOTEQUAL   (RPMSENSE_EQUAL ^ RPMSENSE_SENSEMASK)
 

Typedefs

typedef struct EVR_s * EVR_t
 
typedef enum evrFlags_e evrFlags
 Dependency Attributes. More...
 
typedef enum evrFlags_e rpmsenseFlags
 

Enumerations

enum  evrFlags_e { RPMSENSE_LESS = (1 << 1), RPMSENSE_GREATER = (1 << 2), RPMSENSE_EQUAL = (1 << 3), RPMSENSE_PREREQ = (1 << 6) }
 Dependency Attributes. More...
 

Functions

EVR_t rpmEVRnew (uint32_t Flags, int initialize)
 Create a new EVR container. More...
 
EVR_t rpmEVRfree (EVR_t evr)
 Destroy an EVR container. More...
 
int rpmEVRcmp (const char *a, const char *b)
 Segmented string compare. More...
 
int rpmEVRparse (const char *evrstr, EVR_t evr)
 Split EVR string into epoch, version, and release components. More...
 
int rpmEVRcompare (const EVR_t a, const EVR_t b)
 Compare EVR containers for equality. More...
 
int rpmEVRoverlap (EVR_t a, EVR_t b)
 Compare EVR containers for overlap. More...
 
rpmsenseFlags rpmEVRflags (const char *op, const char **end)
 Return comparison operator sense flags. More...
 

Variables

int _rpmevr_debug
 
int(* rpmvercmp )(const char *a, const char *b)
 Segmented string compare vector. More...
 

Macro Definition Documentation

§ RPMSENSE_NOTEQUAL

#define RPMSENSE_NOTEQUAL   (RPMSENSE_EQUAL ^ RPMSENSE_SENSEMASK)

Definition at line 76 of file rpmevr.h.

Referenced by init_rpm(), rpmdsCompare(), rpmdsNewDNEVR(), rpmEVRoverlap(), and unsatisfiedDepend().

§ RPMSENSE_SENSEMASK

#define RPMSENSE_SENSEMASK   (RPMSENSE_EQUAL | RPMSENSE_GREATER | RPMSENSE_LESS)

Typedef Documentation

§ EVR_t

typedef struct EVR_s* EVR_t

Definition at line 20 of file rpmevr.h.

§ evrFlags

typedef enum evrFlags_e evrFlags

Dependency Attributes.

§ rpmsenseFlags

typedef enum evrFlags_e rpmsenseFlags

Definition at line 72 of file rpmevr.h.

Enumeration Type Documentation

§ evrFlags_e

enum evrFlags_e

Dependency Attributes.

Enumerator
RPMSENSE_LESS 
RPMSENSE_GREATER 
RPMSENSE_EQUAL 
RPMSENSE_PREREQ 

(obsolete).

Definition at line 26 of file rpmevr.h.

Function Documentation

§ rpmEVRcmp()

int rpmEVRcmp ( const char *  a,
const char *  b 
)

Segmented string compare.

Parameters
a1st string
b2nd string
Returns
+1 if a is "newer", 0 if equal, -1 if b is "newer"

Definition at line 87 of file rpmevr.c.

References _invert_digits_alphas_comparison, MAX, xisdigit(), and xisrpmalpha().

§ rpmEVRcompare()

int rpmEVRcompare ( const EVR_t  a,
const EVR_t  b 
)

Compare EVR containers for equality.

Parameters
a1st EVR container
b2nd EVR container
Returns
+1 if a is "newer", 0 if equal, -1 if b is "newer"

Definition at line 274 of file rpmevr.c.

References _, compare_values(), rpmEVRorder(), rpmlog(), RPMLOG_WARNING, RPMSENSE_EQUAL, RPMSENSE_GREATER, and RPMSENSE_LESS.

Referenced by addReqProv(), evrCompare(), labelCompare(), pointRpmEVR(), rpmEVRoverlap(), and rpmfcHelper().

§ rpmEVRflags()

rpmsenseFlags rpmEVRflags ( const char *  op,
const char **  end 
)

Return comparison operator sense flags.

Parameters
opoperator string (NULL or "" uses RPMSENSE_EQUAL)
*endpointer to 1st character after operator (or NULL)
Returns
sense flags

Definition at line 400 of file rpmevr.c.

References cops, EVRop_s::opstr, RPMSENSE_EQUAL, and EVRop_s::sense.

Referenced by parseRCPOT(), rpmdsPipe(), and rpmdsSysinfoFile().

§ rpmEVRfree()

EVR_t rpmEVRfree ( EVR_t  evr)

Destroy an EVR container.

Parameters
EVRcontainer
Returns
NULL always

Definition at line 47 of file rpmevr.c.

References _free(), and _invert_digits_alphas_comparison.

Referenced by addReqProv(), evrCompare(), evrSplit(), labelCompare(), nwlookupTag(), PRCOsqlTag(), rpmfcHelper(), and wnlookupTag().

§ rpmEVRnew()

EVR_t rpmEVRnew ( uint32_t  Flags,
int  initialize 
)

Create a new EVR container.

Parameters
FlagsEVR inequality flags
initializeShould empty defaults be initialized?
Returns
initialized EVR container

Definition at line 31 of file rpmevr.c.

References xcalloc().

Referenced by addReqProv(), evrCompare(), evrSplit(), labelCompare(), nwlookupTag(), PRCOsqlTag(), rpmfcHelper(), and wnlookupTag().

§ rpmEVRoverlap()

int rpmEVRoverlap ( EVR_t  a,
EVR_t  b 
)

Compare EVR containers for overlap.

Parameters
a1st EVR container
b2nd EVR container
Returns
1 if EVR inequalities overlap, 0 otherwise

Definition at line 333 of file rpmevr.c.

References rpmEVRcompare(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, and RPMSENSE_NOTEQUAL.

Referenced by nwlookupTag(), and wnlookupTag().

§ rpmEVRparse()

int rpmEVRparse ( const char *  evrstr,
EVR_t  evr 
)

Split EVR string into epoch, version, and release components.

Parameters
evrstr[epoch:]version[-release] string
Return values
*evrparse results
Returns
0 always

Definition at line 179 of file rpmevr.c.

References mireRegexec(), mireSetEOptions(), rpmEVRmire(), and xstrdup().

Referenced by addReqProv(), dpkgEVRparse(), evrCompare(), evrSplit(), nwlookupTag(), parseRCPOT(), pointRpmEVR(), PRCOsqlTag(), rpmdsCompare(), rpmfcHelper(), and wnlookupTag().

Variable Documentation

§ _rpmevr_debug

int _rpmevr_debug

Definition at line 25 of file rpmevr.c.

§ rpmvercmp

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

Segmented string compare vector.

Parameters
a1st string
b2nd string
Returns
+1 if a is "newer", 0 if equal, -1 if b is "newer"

Definition at line 373 of file rpmevr.c.

Referenced by compare_values(), rpmdsCompare(), and rpmVersionCompare().