libpkgconf: pkg: fix long-standing bug where -uninstalled pkg-config files would have the wrong identifier

Ariadne Conill 2023-08-17 11:53:07 -07:00
parent f0f28fa690
commit a265f8a42b
1 changed files with 7 additions and 0 deletions

View File

@ -457,6 +457,13 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *
if (idptr)
*idptr = '\0';
if (pkg->flags & PKGCONF_PKG_PROPF_UNINSTALLED)
{
idptr = strrchr(pkg->id, '-');
if (idptr)
*idptr = '\0';
}
pkgconf_parser_parse(f, pkg, pkg_parser_funcs, (pkgconf_parser_warn_func_t) pkg_warn_func, pkg->filename);
if (!pkgconf_pkg_validate(client, pkg))