Compare commits

..

No commits in common. "a61193c7236f5b240585c4f8eef6f452f1d9a7ee" and "bc272e4e9faf64054f8b3181285069c2896c2396" have entirely different histories.

2 changed files with 11 additions and 4 deletions

View File

@ -414,12 +414,15 @@ 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, override sysroot_dir for this
* package.
/* If pc_filedir is outside of sysroot_dir, clear pc_filedir
* See https://github.com/pkgconf/pkgconf/issues/213
*/
if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)))
pkgconf_tuple_add(client, &pkg->vars, "pc_sysrootdir", "", false);
{
free(client->sysroot_dir);
client->sysroot_dir = NULL;
pkgconf_client_set_sysroot_dir(client, NULL);
}
/* make module id */
if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)

View File

@ -218,6 +218,10 @@ 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)
{
@ -227,7 +231,7 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const c
return tuple->value;
}
return pkgconf_tuple_find_global(client, key);
return NULL;
}
/*