dpkg 1.21.11
|
Data Structures | |
struct | dpkg_version |
Data structure representing a Debian version. More... | |
Macros | |
#define | DPKG_VERSION_OBJECT(e, v, r) (struct dpkg_version){ .epoch = (e), .version = (v), .revision = (r) } |
Compound literal for a dpkg_version. More... | |
#define | DPKG_VERSION_INIT DPKG_VERSION_OBJECT(0, NULL, NULL) |
Enumerations | |
enum | dpkg_relation { DPKG_RELATION_NONE = 0 , DPKG_RELATION_EQ = DPKG_BIT(0) , DPKG_RELATION_LT = DPKG_BIT(1) , DPKG_RELATION_LE = DPKG_RELATION_LT | DPKG_RELATION_EQ , DPKG_RELATION_GT = DPKG_BIT(2) , DPKG_RELATION_GE = DPKG_RELATION_GT | DPKG_RELATION_EQ } |
Enum constants for the supported relation operations that can be done on Debian versions. More... | |
Functions | |
void | dpkg_version_blank (struct dpkg_version *version) |
Turn the passed version into an empty version. More... | |
bool | dpkg_version_is_informative (const struct dpkg_version *version) |
Test if a version is not empty. More... | |
int | dpkg_version_compare (const struct dpkg_version *a, const struct dpkg_version *b) |
Compares two Debian versions. More... | |
bool | dpkg_version_relate (const struct dpkg_version *a, enum dpkg_relation rel, const struct dpkg_version *b) |
Check if two versions have a certain relation. More... | |
#define DPKG_VERSION_INIT DPKG_VERSION_OBJECT(0, NULL, NULL) |
#define DPKG_VERSION_OBJECT | ( | e, | |
v, | |||
r | |||
) | (struct dpkg_version){ .epoch = (e), .version = (v), .revision = (r) } |
Compound literal for a dpkg_version.
enum dpkg_relation |
Enum constants for the supported relation operations that can be done on Debian versions.
void dpkg_version_blank | ( | struct dpkg_version * | version | ) |
Turn the passed version into an empty version.
This can be used to ensure the version is properly initialized.
version | The version to clear. |
Referenced by cmpversions(), pkg_blank(), and pkgbin_blank().
int dpkg_version_compare | ( | const struct dpkg_version * | a, |
const struct dpkg_version * | b | ||
) |
Compares two Debian versions.
This function follows the convention of the comparator functions used by qsort().
a | The first version. |
b | The second version. |
0 | If a and b are equal. |
<0 | If a is smaller than b. |
>0 | If a is greater than b. |
References dpkg_version::epoch.
Referenced by cmpversions(), deferred_configure(), dpkg_version_relate(), and wanttoinstall().
bool dpkg_version_is_informative | ( | const struct dpkg_version * | version | ) |
Test if a version is not empty.
version | The version to test. |
true | If the version is informative (i.e. not an empty version). |
false | If the version is empty. |
Referenced by cmpversions(), depisok(), pkg_is_informative(), w_configversion(), and w_version().
bool dpkg_version_relate | ( | const struct dpkg_version * | a, |
enum dpkg_relation | rel, | ||
const struct dpkg_version * | b | ||
) |
Check if two versions have a certain relation.
a | The first version. |
rel | The relation. |
b | The second version. |
true | If rel is DPKG_RELATION_NONE or the expression “a rel b” is true. |
false | Otherwise. |
References DPKG_RELATION_EQ, DPKG_RELATION_GE, DPKG_RELATION_GT, DPKG_RELATION_LE, DPKG_RELATION_LT, DPKG_RELATION_NONE, dpkg_version_compare(), and internerr.
Referenced by depisok(), pkg_virtual_deppossi_satisfied(), and versionsatisfied().