From: Arch Librarian Date: Thu, 14 Jul 2005 13:05:03 +0000 (+0000) Subject: 2002-02-13 Havoc Pennington X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08343b5eff53945fd446465c6b29f94d01a94966;p=pkg-config 2002-02-13 Havoc Pennington Author: hp Date: 2002-02-13 05:14:57 GMT 2002-02-13 Havoc Pennington * pkg.c (internal_get_package): look up path position by package key, not package name --- diff --git a/ChangeLog b/ChangeLog index cc40b0f..c708c6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-13 Havoc Pennington + + * pkg.c (internal_get_package): look up path position by package + key, not package name + 2002-02-12 Havoc Pennington * pkg.c (scan_dir): use g_strdup, and fix the location where diff --git a/pkg.c b/pkg.c index c3f6e72..d071ff4 100644 --- a/pkg.c +++ b/pkg.c @@ -271,12 +271,6 @@ internal_get_package (const char *name, gboolean warn, gboolean check_compat) debug_spew ("Failed to parse '%s'\n", location); return NULL; } - - pkg->path_position = - GPOINTER_TO_INT (g_hash_table_lookup (path_positions, pkg->name)); - - debug_spew ("Path position of '%s' is %d\n", - pkg->name, pkg->path_position); if (strstr (location, "uninstalled.pc")) pkg->uninstalled = TRUE; @@ -298,6 +292,12 @@ internal_get_package (const char *name, gboolean warn, gboolean check_compat) pkg->key = g_strndup (start, end - start); } + pkg->path_position = + GPOINTER_TO_INT (g_hash_table_lookup (path_positions, pkg->key)); + + debug_spew ("Path position of '%s' is %d\n", + pkg->name, pkg->path_position); + verify_package (pkg); debug_spew ("Adding '%s' to list of known packages, returning as package '%s'\n",