2002-02-13 Havoc Pennington <hp@redhat.com>

Author: hp
Date: 2002-02-13 05:14:57 GMT
2002-02-13  Havoc Pennington  <hp@redhat.com>

	* pkg.c (internal_get_package): look up path position by package
	key, not package name
This commit is contained in:
Arch Librarian 2005-07-14 13:05:03 +00:00
parent 3e813e2dfc
commit 08343b5eff
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2002-02-13 Havoc Pennington <hp@redhat.com>
* pkg.c (internal_get_package): look up path position by package
key, not package name
2002-02-12 Havoc Pennington <hp@redhat.com>
* pkg.c (scan_dir): use g_strdup, and fix the location where

12
pkg.c
View file

@ -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",