Compare commits
3 Commits
08f4a9da15
...
5825e2c6d6
Author | SHA1 | Date |
---|---|---|
Kai Pastor | 5825e2c6d6 | |
Kai Pastor | b2f8386c32 | |
Kai Pastor | 125af82dbe |
16
cli/main.c
16
cli/main.c
|
@ -333,7 +333,12 @@ apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int
|
|||
pkgconf_dependency_t *dep = world_iter->data;
|
||||
pkgconf_pkg_t *pkg = dep->match;
|
||||
|
||||
if (strcmp(pkg->why, queue_node->package))
|
||||
const size_t name_len = strlen(pkg->why);
|
||||
if (name_len > strlen(queue_node->package) ||
|
||||
strncmp(pkg->why, queue_node->package, name_len) ||
|
||||
(queue_node->package[name_len] != 0 &&
|
||||
!isspace(queue_node->package[name_len]) &&
|
||||
!PKGCONF_IS_OPERATOR_CHAR(queue_node->package[name_len])))
|
||||
continue;
|
||||
|
||||
if (pkg->version != NULL) {
|
||||
|
@ -1400,6 +1405,15 @@ cleanup3:
|
|||
pkgconf_queue_push(&pkgq, package);
|
||||
pkg_optind++;
|
||||
}
|
||||
else if (argv[pkg_optind + 2] == NULL)
|
||||
{
|
||||
char packagebuf[PKGCONF_BUFSIZE];
|
||||
|
||||
snprintf(packagebuf, sizeof packagebuf, "%s %s", package, argv[pkg_optind + 1]);
|
||||
pkg_optind += 2;
|
||||
|
||||
pkgconf_queue_push(&pkgq, packagebuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
char packagebuf[PKGCONF_BUFSIZE];
|
||||
|
|
|
@ -27,6 +27,9 @@ tests_init \
|
|||
modversion_fullpath \
|
||||
modversion_provides \
|
||||
modversion_uninstalled \
|
||||
modversion_one_word_expression \
|
||||
modversion_two_word_expression \
|
||||
modversion_three_word_expression \
|
||||
pcpath \
|
||||
virtual_variable \
|
||||
fragment_collision \
|
||||
|
@ -301,3 +304,21 @@ modversion_uninstalled_body()
|
|||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion omg
|
||||
}
|
||||
|
||||
modversion_one_word_expression_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion "foo > 1.0"
|
||||
}
|
||||
|
||||
modversion_two_word_expression_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion foo "> 1.0"
|
||||
}
|
||||
|
||||
modversion_three_word_expression_body()
|
||||
{
|
||||
atf_check -o inline:"1.2.3\n" \
|
||||
pkgconf --with-path="${selfdir}/lib1" --modversion foo ">" 1.0
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue