summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2016-08-22 14:36:50 -0700
committerDan Nicholson <dbn.lists@gmail.com>2016-08-22 14:36:50 -0700
commit983052ddf8084718d646759eb58693249402e396 (patch)
tree1cea7c63871cac68f2fe5de8ddea00575cff7073
parent908cdd062ad318957525609e568d3eea85e4bac3 (diff)
Remove unused package_list_strip_duplicates
After 908cdd0, there are no more duplicates in the package list and this function is unused.
-rw-r--r--pkg.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/pkg.c b/pkg.c
index da3b3f4..5aa4380 100644
--- a/pkg.c
+++ b/pkg.c
@@ -599,43 +599,6 @@ merge_flag_lists (GList *packages, FlagType type)
return merged;
}
-/* Work backwards from the end of the package list to remove duplicate
- * packages. This could happen because the package was specified multiple
- * times on the command line, or because multiple packages require the same
- * package. When we have duplicate dependencies, starting from the end of the
- * list ensures that the dependency shows up later in the package list and
- * Libs will come out correctly. */
-static GList *
-package_list_strip_duplicates (GList *packages)
-{
- GList *cur;
- GHashTable *requires;
-
- requires = g_hash_table_new (g_str_hash, g_str_equal);
- for (cur = g_list_last (packages); cur != NULL; cur = g_list_previous (cur))
- {
- Package *pkg = cur->data;
-
- if (g_hash_table_lookup_extended (requires, pkg->key, NULL, NULL))
- {
- GList *dup = cur;
-
- /* Remove the duplicate package from the list */
- debug_spew ("Removing duplicate package %s\n", pkg->key);
- cur = cur->next;
- packages = g_list_delete_link (packages, dup);
- }
- else
- {
- /* Unique package. Track it and move to the next. */
- g_hash_table_replace (requires, pkg->key, pkg->key);
- }
- }
- g_hash_table_destroy (requires);
-
- return packages;
-}
-
static GList *
fill_list (GList *packages, FlagType type,
gboolean in_path_order, gboolean include_private)