pkg: fix sysroot_dir logic for github 213
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
d68a867dc0
commit
a61193c723
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue