2001-06-14 Havoc Pennington <hp@redhat.com>

Author: hp
Date: 2001-06-14 10:09:03 GMT
2001-06-14  Havoc Pennington  <hp@redhat.com>

	* pkg.c (internal_get_package): don't fall back to legacy -config
	scripts for the -uninstalled case.

2001-06-07  Havoc Pennington  <hp@redhat.com>

	* pkg.m4: add URL to no-pkg-config error message
This commit is contained in:
Arch Librarian 2005-07-14 13:04:13 +00:00
parent 262ab6b259
commit 9a24428500
3 changed files with 31 additions and 16 deletions

View file

@ -1,3 +1,12 @@
2001-06-14 Havoc Pennington <hp@redhat.com>
* pkg.c (internal_get_package): don't fall back to legacy -config
scripts for the -uninstalled case.
2001-06-07 Havoc Pennington <hp@redhat.com>
* pkg.m4: add URL to no-pkg-config error message
2001-06-06 Havoc Pennington <hp@redhat.com>
* pkg.m4: Fix mismatched backtick

37
pkg.c
View file

@ -161,7 +161,7 @@ file_readable (const char *path)
static Package *
internal_get_package (const char *name, gboolean warn)
internal_get_package (const char *name, gboolean warn, gboolean check_compat)
{
Package *pkg = NULL;
const char *location;
@ -189,7 +189,7 @@ internal_get_package (const char *name, gboolean warn)
un = g_strconcat (name, "-uninstalled", NULL);
pkg = internal_get_package (un, FALSE);
pkg = internal_get_package (un, FALSE, FALSE);
g_free (un);
@ -204,25 +204,30 @@ internal_get_package (const char *name, gboolean warn)
debug_spew ("Reading '%s' from file '%s'\n", name, location);
}
if (location == NULL)
if (location == NULL && check_compat)
{
pkg = get_compat_package (name);
if (pkg == NULL)
if (pkg)
{
if (warn)
verbose_error ("Package %s was not found in the pkg-config search path.\n"
"Perhaps you should add the directory containing `%s.pc'\n"
"to the PKG_CONFIG_PATH environment variable\n",
name, name);
debug_spew ("Returning values for '%s' from a legacy -config script\n",
name);
return pkg;
}
debug_spew ("Returning values for '%s' from a legacy -config script\n",
name);
return pkg;
}
if (pkg == NULL)
{
if (warn)
verbose_error ("Package %s was not found in the pkg-config search path.\n"
"Perhaps you should add the directory containing `%s.pc'\n"
"to the PKG_CONFIG_PATH environment variable\n",
name, name);
return NULL;
}
pkg = parse_package_file (location);
if (pkg == NULL)
@ -264,7 +269,7 @@ internal_get_package (const char *name, gboolean warn)
Package *
get_package (const char *name)
{
return internal_get_package (name, TRUE);
return internal_get_package (name, TRUE, TRUE);
}
static GSList*

1
pkg.m4
View file

@ -13,6 +13,7 @@ AC_DEFUN(PKG_CHECK_MODULES, [
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then
echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer."