Compare commits
2 Commits
bc272e4e9f
...
a61193c723
Author | SHA1 | Date |
---|---|---|
Ariadne Conill | a61193c723 | |
Ariadne Conill | d68a867dc0 |
|
@ -414,15 +414,12 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *
|
|||
pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pc_filedir_value, true);
|
||||
free(pc_filedir_value);
|
||||
|
||||
/* If pc_filedir is outside of sysroot_dir, clear pc_filedir
|
||||
/* If pc_filedir is outside of sysroot_dir, override sysroot_dir for this
|
||||
* package.
|
||||
* See https://github.com/pkgconf/pkgconf/issues/213
|
||||
*/
|
||||
if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)))
|
||||
{
|
||||
free(client->sysroot_dir);
|
||||
client->sysroot_dir = NULL;
|
||||
pkgconf_client_set_sysroot_dir(client, NULL);
|
||||
}
|
||||
pkgconf_tuple_add(client, &pkg->vars, "pc_sysrootdir", "", false);
|
||||
|
||||
/* make module id */
|
||||
if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)
|
||||
|
|
|
@ -218,10 +218,6 @@ char *
|
|||
pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const char *key)
|
||||
{
|
||||
pkgconf_node_t *node;
|
||||
char *res;
|
||||
|
||||
if ((res = pkgconf_tuple_find_global(client, key)) != NULL)
|
||||
return res;
|
||||
|
||||
PKGCONF_FOREACH_LIST_ENTRY(list->head, node)
|
||||
{
|
||||
|
@ -231,7 +227,7 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const c
|
|||
return tuple->value;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return pkgconf_tuple_find_global(client, key);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue