dpkg 1.22.7-3-g89f48
|
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. | |
#define | DPKG_VERSION_INIT DPKG_VERSION_OBJECT(0, NULL, NULL) |
Functions | |
void | dpkg_version_blank (struct dpkg_version *version) |
Turn the passed version into an empty version. | |
bool | dpkg_version_is_informative (const struct dpkg_version *version) |
Test if a version is not empty. | |
int | dpkg_version_compare (const struct dpkg_version *a, const struct dpkg_version *b) |
Compares two Debian versions. | |
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. | |
Variables | |
enum DPKG_ATTR_ENUM_FLAGS | dpkg_relation |
Enum constants for the supported relation operations that can be done on Debian versions. | |
#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.
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. |
References dpkg_version::epoch, dpkg_version::revision, and dpkg_version::version.
Referenced by cmpversions(), f_dependency(), pkg_blank(), pkgbin_blank(), and removal_bulk().
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, dpkg_version::revision, and dpkg_version::version.
Referenced by cmpversions(), deferred_configure(), dpkg_version_relate(), parsedb_parse(), process_archive(), 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. |
References dpkg_version::epoch, dpkg_version::revision, and dpkg_version::version.
Referenced by cmpversions(), deferred_configure(), depisok(), ensure_packagefiles_available(), parsedb_parse(), pkg_is_informative(), versiondescribe(), 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().
enum DPKG_ATTR_ENUM_FLAGS dpkg_relation |
Enum constants for the supported relation operations that can be done on Debian versions.