Quantcast
Channel: Pacman issues
Viewing all articles
Browse latest Browse all 116

Use version range structure in alpm_depend_t instead of single version and mod?

$
0
0
I'm working on the "expectfailure" test of tests/pacman/tests/deprange001.py and its detailed description can be found in commit [9813107c](https://gitlab.archlinux.org/pacman/pacman/-/commit/9813107c3368684784706cf2b77bd056bea58e3c "test version range restrictions corner case"). The problem is, we are checking the conditions on the same package separately. And the conditions could be satisfied separately but not together. So, my idea is moving all version conditions on the same package to one single alpm_depend_t structure, instead of severals. And the alpm_depend_t could be updated like ```c typedef struct _alpm_version_range { /** Version low boundary */ char *version_min; /** How the low boundary version should match against the provider */ alpm_depmod_t mod_min; /** Version high boundary */ char *version_max; /** How the high boundary version should match against the provider */ alpm_depmod_t mod_max; } alpm_version_range; typedef struct _alpm_depend_t { /** Name of the provider to satisfy this dependency */ char *name; /** Version range of the provider to match against (optional) */ alpm_version_range* version_range; /** A description of why this dependency is needed (optional) */ char *desc; /** A hash of name (used internally to speed up conflict checks) */ unsigned long name_hash; } alpm_depend_t; ``` Since it involves a lot of changes in libalpm, I think it's better to discuss first. What do you guys think?

Viewing all articles
Browse latest Browse all 116

Trending Articles