rpm
5.4.10
|
#include "system.h"
#include <rpmiotypes.h>
#include <rpmmacro.h>
#include <mire.h>
#include <rpmlog.h>
#include <set.h>
#include <rpmtag.h>
#include <rpmevr.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | EVRop_s |
Macros | |
#define | _MIRE_INTERNAL |
#define | _RPMEVR_INTERNAL |
#define | MAX(x, y) ( ((x)>(y))?(x):(y) ) |
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... | |
static int | xisrpmalpha (int c) |
Return rpm's analogue of xisalpha. More... | |
int | rpmEVRcmp (const char *a, const char *b) |
Segmented string compare. More... | |
static miRE | rpmEVRmire (void) |
int | rpmEVRparse (const char *evrstr, EVR_t evr) |
Split EVR string into epoch, version, and release components. More... | |
static int | compare_values (const char *a, const char *b) |
Dressed rpmEVRcmp, handling missing values. More... | |
static const char * | rpmEVRorder (void) |
Return precedence permutation string. 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... | |
int | rpmVersionCompare (Header A, Header B) |
Variables | |
int | _rpmevr_debug = 0 |
static int | _invert_digits_alphas_comparison = 1 |
static const char * | _rpmnotalpha = ".:-" |
static const char * | _evr_tuple_match |
const char * | evr_tuple_match = NULL |
miRE | evr_tuple_mire = NULL |
static const char * | evr_tuple_order = NULL |
int(* | rpmvercmp )(const char *a, const char *b) = rpmEVRcmp |
Segmented string compare vector. More... | |
static struct EVRop_s | cops [] |
#define MAX | ( | x, | |
y | |||
) | ( ((x)>(y))?(x):(y) ) |
Definition at line 28 of file rpmevr.c.
Referenced by rpmEVRcmp().
|
static |
Dressed rpmEVRcmp, handling missing values.
a | 1st string |
b | 2nd string |
Definition at line 246 of file rpmevr.c.
References rpmvercmp.
Referenced by rpmEVRcompare().
int rpmEVRcmp | ( | const char * | a, |
const char * | b | ||
) |
Segmented string compare.
a | 1st string |
b | 2nd string |
Definition at line 87 of file rpmevr.c.
References _invert_digits_alphas_comparison, MAX, xisdigit(), and xisrpmalpha().
Compare EVR containers for equality.
a | 1st EVR container |
b | 2nd EVR container |
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().
rpmsenseFlags rpmEVRflags | ( | const char * | op, |
const char ** | end | ||
) |
Return comparison operator sense flags.
op | operator string (NULL or "" uses RPMSENSE_EQUAL) |
*end | pointer to 1st character after operator (or NULL) |
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().
Destroy an EVR container.
EVR | container |
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().
|
static |
Definition at line 157 of file rpmevr.c.
References evr_tuple_mire, mireNew(), mireRegcomp(), mireSetCOptions(), rpmExpand(), RPMMIRE_REGEX, and xstrdup().
Referenced by rpmEVRparse().
EVR_t rpmEVRnew | ( | uint32_t | Flags, |
int | initialize | ||
) |
Create a new EVR container.
Flags | EVR inequality flags |
initialize | Should empty defaults be initialized? |
Definition at line 31 of file rpmevr.c.
References xcalloc().
Referenced by addReqProv(), evrCompare(), evrSplit(), labelCompare(), nwlookupTag(), PRCOsqlTag(), rpmfcHelper(), and wnlookupTag().
|
static |
Return precedence permutation string.
Definition at line 260 of file rpmevr.c.
References evr_tuple_order, rpmExpand(), and xstrdup().
Referenced by rpmEVRcompare(), and rpmVersionCompare().
Compare EVR containers for overlap.
a | 1st EVR container |
b | 2nd EVR container |
Definition at line 333 of file rpmevr.c.
References rpmEVRcompare(), RPMSENSE_EQUAL, RPMSENSE_GREATER, RPMSENSE_LESS, and RPMSENSE_NOTEQUAL.
Referenced by nwlookupTag(), and wnlookupTag().
int rpmEVRparse | ( | const char * | evrstr, |
EVR_t | evr | ||
) |
Split EVR string into epoch, version, and release components.
evrstr | [epoch:]version[-release] string |
*evr | parse results |
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().
Definition at line 419 of file rpmevr.c.
References _free(), alloca(), headerGet(), _HE_s::p, rpmDataType_u::ptr, rpmEVRorder(), RPMTAG_DISTEPOCH, RPMTAG_EPOCH, RPMTAG_RELEASE, RPMTAG_VERSION, rpmvercmp, rpmDataType_u::str, _HE_s::tag, and rpmDataType_u::ui32p.
Referenced by hdr_compare(), and rpmcliInstall().
|
inlinestatic |
Return rpm's analogue of xisalpha.
c | character to test |
Definition at line 74 of file rpmevr.c.
References xisalpha(), and xispunct().
Referenced by rpmEVRcmp().
|
static |
|
static |
Definition at line 62 of file rpmevr.c.
Referenced by rpmEVRcmp(), and rpmEVRfree().
|
static |
Referenced by rpmEVRflags().
const char* evr_tuple_match = NULL |
Definition at line 153 of file rpmevr.c.
Referenced by rpmcliFini().
miRE evr_tuple_mire = NULL |
Definition at line 155 of file rpmevr.c.
Referenced by rpmcliFini(), and rpmEVRmire().
|
static |
Definition at line 253 of file rpmevr.c.
Referenced by rpmEVRorder().
int(* rpmvercmp) (const char *a, const char *b) = rpmEVRcmp |
Segmented string compare vector.
a | 1st string |
b | 2nd string |
Definition at line 373 of file rpmevr.c.
Referenced by compare_values(), rpmdsCompare(), and rpmVersionCompare().