Blame SOURCES/0002-Revert-Add-leaves-command.patch

6cb0e3
From f4aa2e7c3021775e38d259fe818a94fca4f4fbfc Mon Sep 17 00:00:00 2001
6cb0e3
From: Nicola Sella <nsella@redhat.com>
6cb0e3
Date: Mon, 31 Oct 2022 10:34:23 +0100
6cb0e3
Subject: [PATCH 2/2] Revert "Add leaves command"
6cb0e3
6cb0e3
This reverts commit d1be5fd8fbf07d1204403f641044c83f940ea08a.
6cb0e3
---
6cb0e3
 dnf/CMakeLists.txt                            |   6 -
6cb0e3
 dnf/meson.build                               |   9 -
6cb0e3
 dnf/plugins/leaves/dnf-command-leaves.c       | 386 ------------------
6cb0e3
 .../leaves/dnf-command-leaves.gresource.xml   |   6 -
6cb0e3
 dnf/plugins/leaves/dnf-command-leaves.h       |  31 --
6cb0e3
 dnf/plugins/leaves/leaves.plugin              |   9 -
6cb0e3
 6 files changed, 447 deletions(-)
6cb0e3
 delete mode 100644 dnf/plugins/leaves/dnf-command-leaves.c
6cb0e3
 delete mode 100644 dnf/plugins/leaves/dnf-command-leaves.gresource.xml
6cb0e3
 delete mode 100644 dnf/plugins/leaves/dnf-command-leaves.h
6cb0e3
 delete mode 100644 dnf/plugins/leaves/leaves.plugin
6cb0e3
6cb0e3
diff --git a/dnf/CMakeLists.txt b/dnf/CMakeLists.txt
6cb0e3
index a85906b..89cd1e4 100644
6cb0e3
--- a/dnf/CMakeLists.txt
6cb0e3
+++ b/dnf/CMakeLists.txt
6cb0e3
@@ -35,11 +35,6 @@ glib_compile_resources (DNF_COMMAND_REPOQUERY plugins/repoquery/dnf-command-repo
6cb0e3
                         INTERNAL)
6cb0e3
 list (APPEND DNF_COMMAND_REPOQUERY "plugins/repoquery/dnf-command-repoquery.c")
6cb0e3
 
6cb0e3
-glib_compile_resources (DNF_COMMAND_LEAVES plugins/leaves/dnf-command-leaves.gresource.xml
6cb0e3
-                        C_PREFIX dnf_command_leaves
6cb0e3
-                        INTERNAL)
6cb0e3
-list (APPEND DNF_COMMAND_LEAVES "plugins/leaves/dnf-command-leaves.c")
6cb0e3
-
6cb0e3
 glib_compile_resources (DNF_COMMAND_CLEAN plugins/clean/dnf-command-clean.gresource.xml
6cb0e3
                         C_PREFIX dnf_command_clean
6cb0e3
                         INTERNAL)
6cb0e3
@@ -80,7 +75,6 @@ add_executable (microdnf dnf-main.c ${DNF_SRCS}
6cb0e3
                 ${DNF_COMMAND_DISTROSYNC}
6cb0e3
                 ${DNF_COMMAND_REPOLIST}
6cb0e3
                 ${DNF_COMMAND_REPOQUERY}
6cb0e3
-                ${DNF_COMMAND_LEAVES}
6cb0e3
                 ${DNF_COMMAND_CLEAN}
6cb0e3
                 ${DNF_COMMAND_DOWNLOAD}
6cb0e3
                 ${DNF_COMMAND_MAKECACHE}
6cb0e3
diff --git a/dnf/meson.build b/dnf/meson.build
6cb0e3
index 074d347..daf8fd7 100644
6cb0e3
--- a/dnf/meson.build
6cb0e3
+++ b/dnf/meson.build
6cb0e3
@@ -66,15 +66,6 @@ microdnf_srcs = [
6cb0e3
   ),
6cb0e3
   'plugins/repoquery/dnf-command-repoquery.c',
6cb0e3
 
6cb0e3
-  # leaves
6cb0e3
-  gnome.compile_resources(
6cb0e3
-    'dnf-leaves',
6cb0e3
-    'plugins/leaves/dnf-command-leaves.gresource.xml',
6cb0e3
-    c_name : 'dnf_command_leaves',
6cb0e3
-    source_dir : 'plugins/leaves',
6cb0e3
-  ),
6cb0e3
-  'plugins/leaves/dnf-command-leaves.c',
6cb0e3
-
6cb0e3
   # clean
6cb0e3
   gnome.compile_resources(
6cb0e3
     'dnf-clean',
6cb0e3
diff --git a/dnf/plugins/leaves/dnf-command-leaves.c b/dnf/plugins/leaves/dnf-command-leaves.c
6cb0e3
deleted file mode 100644
6cb0e3
index f264f65..0000000
6cb0e3
--- a/dnf/plugins/leaves/dnf-command-leaves.c
6cb0e3
+++ /dev/null
6cb0e3
@@ -1,386 +0,0 @@
6cb0e3
-/* dnf-command-leaves.c
6cb0e3
- *
6cb0e3
- * Copyright © 2022 Emil Renner Berthing <esmil@mailme.dk>
6cb0e3
- *
6cb0e3
- * This program is free software: you can redistribute it and/or modify
6cb0e3
- * it under the terms of the GNU General Public License as published by
6cb0e3
- * the Free Software Foundation, either version 2 of the License, or
6cb0e3
- * (at your option) any later version.
6cb0e3
- *
6cb0e3
- * This program is distributed in the hope that it will be useful,
6cb0e3
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
6cb0e3
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6cb0e3
- * GNU General Public License for more details.
6cb0e3
- *
6cb0e3
- * You should have received a copy of the GNU General Public License
6cb0e3
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
6cb0e3
- */
6cb0e3
-
6cb0e3
-#include "dnf-command-leaves.h"
6cb0e3
-
6cb0e3
-typedef struct {
6cb0e3
-  guint len;
6cb0e3
-  guint idx[];
6cb0e3
-} IdxArray;
6cb0e3
-
6cb0e3
-static IdxArray *
6cb0e3
-idx_array_new (guint len)
6cb0e3
-{
6cb0e3
-  return g_malloc0 (G_STRUCT_OFFSET (IdxArray, idx) + len * sizeof (guint));
6cb0e3
-}
6cb0e3
-
6cb0e3
-static void
6cb0e3
-idx_array_add (IdxArray *arr, guint idx)
6cb0e3
-{
6cb0e3
-  arr->idx[arr->len++] = idx;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gboolean
6cb0e3
-idx_array_from_set_iter (gpointer key, gpointer value, gpointer user_data)
6cb0e3
-{
6cb0e3
-  IdxArray *arr = user_data;
6cb0e3
-  idx_array_add (arr, GPOINTER_TO_UINT (key));
6cb0e3
-  return TRUE;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gint
6cb0e3
-idx_array_compare_func (gconstpointer a, gconstpointer b, gpointer user_data)
6cb0e3
-{
6cb0e3
-  guint x = *(const guint *)a;
6cb0e3
-  guint y = *(const guint *)b;
6cb0e3
-
6cb0e3
-  if (x < y)
6cb0e3
-    return -1;
6cb0e3
-  return x > y;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static IdxArray *
6cb0e3
-idx_array_copy (const guint *idx, guint len)
6cb0e3
-{
6cb0e3
-  IdxArray *arr = idx_array_new (len);
6cb0e3
-  arr->len = len;
6cb0e3
-  for (guint i = 0; i < len; i++)
6cb0e3
-    arr->idx[i] = idx[i];
6cb0e3
-  g_qsort_with_data (arr->idx, arr->len, sizeof (*arr->idx), idx_array_compare_func, NULL);
6cb0e3
-  return arr;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static IdxArray *
6cb0e3
-idx_array_from_set (GHashTable *set)
6cb0e3
-{
6cb0e3
-  IdxArray *arr = idx_array_new (g_hash_table_size (set));
6cb0e3
-  g_hash_table_foreach_remove (set, idx_array_from_set_iter, arr);
6cb0e3
-  g_qsort_with_data (arr->idx, arr->len, sizeof (*arr->idx), idx_array_compare_func, NULL);
6cb0e3
-  return arr;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gint
6cb0e3
-gtree_dnf_package_cmp (gconstpointer a, gconstpointer b)
6cb0e3
-{
6cb0e3
-  return dnf_package_cmp ((DnfPackage *)a, (DnfPackage *)b);
6cb0e3
-}
6cb0e3
-
6cb0e3
-static GPtrArray *
6cb0e3
-build_graph (HyQuery query, const GPtrArray *pkgs)
6cb0e3
-{
6cb0e3
-  // create pkg2idx to map DnfPackages to their index in pkgs
6cb0e3
-  g_autoptr(GTree) pkg2idx = g_tree_new (gtree_dnf_package_cmp);
6cb0e3
-  for (guint i = 0; i < pkgs->len; i++)
6cb0e3
-    {
6cb0e3
-      DnfPackage *pkg = g_ptr_array_index (pkgs, i);
6cb0e3
-      g_tree_insert (pkg2idx, pkg, GUINT_TO_POINTER (i));
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  GPtrArray *graph = g_ptr_array_new_full (pkgs->len, g_free);
6cb0e3
-  g_autoptr(GHashTable) edges = g_hash_table_new (g_direct_hash, g_direct_equal);
6cb0e3
-
6cb0e3
-  // for each package resolve its dependencies and add an edge if there is
6cb0e3
-  // exactly one package satisfying it
6cb0e3
-  for (guint i = 0; i < pkgs->len; i++)
6cb0e3
-    {
6cb0e3
-      DnfPackage *pkg = g_ptr_array_index (pkgs, i);
6cb0e3
-      g_autoptr(DnfReldepList) reqs = dnf_package_get_requires (pkg);
6cb0e3
-
6cb0e3
-      const gint nreqs = dnf_reldep_list_count (reqs);
6cb0e3
-      for (gint j = 0; j < nreqs; j++)
6cb0e3
-        {
6cb0e3
-          DnfReldep *req = dnf_reldep_list_index (reqs, j);
6cb0e3
-
6cb0e3
-          hy_query_filter_reldep (query, HY_PKG_PROVIDES, req);
6cb0e3
-          g_autoptr(GPtrArray) ppkgs = hy_query_run (query);
6cb0e3
-          hy_query_clear (query);
6cb0e3
-          dnf_reldep_free (req);
6cb0e3
-
6cb0e3
-          if (ppkgs->len != 1)
6cb0e3
-            continue;
6cb0e3
-
6cb0e3
-          DnfPackage *ppkg = g_ptr_array_index (ppkgs, 0);
6cb0e3
-          GTreeNode *node = g_tree_lookup_node (pkg2idx, ppkg);;
6cb0e3
-          g_assert (node);
6cb0e3
-          guint idx = GPOINTER_TO_UINT (g_tree_node_value (node));
6cb0e3
-          if (idx != i) // don't add self-edges
6cb0e3
-            g_hash_table_insert (edges, GUINT_TO_POINTER (idx), NULL);
6cb0e3
-        }
6cb0e3
-
6cb0e3
-      g_ptr_array_add (graph, idx_array_from_set (edges));
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  return graph;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static GPtrArray *
6cb0e3
-reverse_graph (const GPtrArray *graph)
6cb0e3
-{
6cb0e3
-  g_autofree guint *len = g_malloc0 (graph->len * sizeof (*len));
6cb0e3
-
6cb0e3
-  for (guint i = 0; i < graph->len; i++)
6cb0e3
-    {
6cb0e3
-      const IdxArray *edges = g_ptr_array_index (graph, i);
6cb0e3
-
6cb0e3
-      for (guint j = 0; j < edges->len; j++)
6cb0e3
-        len[edges->idx[j]]++;
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  GPtrArray *rgraph = g_ptr_array_new_full (graph->len, g_free);
6cb0e3
-  for (guint i = 0; i < graph->len; i++)
6cb0e3
-    g_ptr_array_add (rgraph, idx_array_new (len[i]));
6cb0e3
-
6cb0e3
-  for (guint i = 0; i < graph->len; i++)
6cb0e3
-    {
6cb0e3
-      const IdxArray *edges = g_ptr_array_index (graph, i);
6cb0e3
-
6cb0e3
-      for (guint j = 0; j < edges->len; j++)
6cb0e3
-        {
6cb0e3
-          IdxArray *redges = g_ptr_array_index (rgraph, edges->idx[j]);
6cb0e3
-          idx_array_add (redges, i);
6cb0e3
-        }
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  return rgraph;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static GPtrArray *
6cb0e3
-kosaraju (const GPtrArray *graph)
6cb0e3
-{
6cb0e3
-  const guint N = graph->len;
6cb0e3
-  g_autofree guint *rstack = g_malloc (N * sizeof (*rstack));
6cb0e3
-  g_autofree guint *stack = g_malloc (N * sizeof (*stack));
6cb0e3
-  g_autofree gboolean *tag = g_malloc0 (N * sizeof (*tag));
6cb0e3
-  guint r = N;
6cb0e3
-  guint top = 0;
6cb0e3
-
6cb0e3
-  // do depth-first searches in the graph and push nodes to rstack
6cb0e3
-  // "on the way up" until all nodes have been pushed.
6cb0e3
-  // tag nodes as they're processed so we don't visit them more than once
6cb0e3
-  for (guint i = 0; i < N; i++)
6cb0e3
-    {
6cb0e3
-      if (tag[i])
6cb0e3
-        continue;
6cb0e3
-
6cb0e3
-      guint u = i;
6cb0e3
-      guint j = 0;
6cb0e3
-      tag[u] = TRUE;
6cb0e3
-      while (true)
6cb0e3
-        {
6cb0e3
-          const IdxArray *edges = g_ptr_array_index (graph, u);
6cb0e3
-          if (j < edges->len)
6cb0e3
-            {
6cb0e3
-              const guint v = edges->idx[j++];
6cb0e3
-              if (!tag[v])
6cb0e3
-                {
6cb0e3
-                  rstack[top] = j;
6cb0e3
-                  stack[top++] = u;
6cb0e3
-                  u = v;
6cb0e3
-                  j = 0;
6cb0e3
-                  tag[u] = TRUE;
6cb0e3
-                }
6cb0e3
-            }
6cb0e3
-          else
6cb0e3
-            {
6cb0e3
-              rstack[--r] = u;
6cb0e3
-              if (!top)
6cb0e3
-                break;
6cb0e3
-              u = stack[--top];
6cb0e3
-              j = rstack[top];
6cb0e3
-            }
6cb0e3
-        }
6cb0e3
-    }
6cb0e3
-  g_assert (r == 0);
6cb0e3
-
6cb0e3
-  // now searches beginning at nodes popped from rstack in the graph with all
6cb0e3
-  // edges reversed will give us the strongly connected components.
6cb0e3
-  // this time all nodes are tagged, so let's remove the tags as we visit each
6cb0e3
-  // node.
6cb0e3
-  // the incoming edges to each component is the union of incoming edges to
6cb0e3
-  // each node in the component minus the incoming edges from component nodes
6cb0e3
-  // themselves.
6cb0e3
-  // if there are no such incoming edges the component is a leaf and we
6cb0e3
-  // add it to the array of leaves.
6cb0e3
-  g_autoptr(GPtrArray) rgraph = reverse_graph (graph);
6cb0e3
-  g_autoptr(GHashTable) sccredges = g_hash_table_new (g_direct_hash, g_direct_equal);
6cb0e3
-  GPtrArray *leaves = g_ptr_array_new_with_free_func (g_free);
6cb0e3
-  for (; r < N; r++)
6cb0e3
-    {
6cb0e3
-      guint u = rstack[r];
6cb0e3
-      if (!tag[u])
6cb0e3
-        continue;
6cb0e3
-
6cb0e3
-      stack[top++] = u;
6cb0e3
-      tag[u] = FALSE;
6cb0e3
-      guint s = N;
6cb0e3
-      while (top)
6cb0e3
-        {
6cb0e3
-          u = stack[--s] = stack[--top];
6cb0e3
-          const IdxArray *redges = g_ptr_array_index (rgraph, u);
6cb0e3
-          for (guint j = 0; j < redges->len; j++)
6cb0e3
-            {
6cb0e3
-              const guint v = redges->idx[j];
6cb0e3
-              g_hash_table_insert (sccredges, GUINT_TO_POINTER (v), NULL);
6cb0e3
-              if (!tag[v])
6cb0e3
-                continue;
6cb0e3
-
6cb0e3
-              stack[top++] = v;
6cb0e3
-              tag[v] = FALSE;
6cb0e3
-            }
6cb0e3
-        }
6cb0e3
-
6cb0e3
-      for (guint i = s; i < N; i++)
6cb0e3
-        g_hash_table_remove (sccredges, GUINT_TO_POINTER (stack[i]));
6cb0e3
-
6cb0e3
-      if (g_hash_table_size (sccredges) == 0)
6cb0e3
-        g_ptr_array_add (leaves, idx_array_copy (&stack[s], N - s));
6cb0e3
-      else
6cb0e3
-        g_hash_table_remove_all (sccredges);
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  return leaves;
6cb0e3
-}
6cb0e3
-
6cb0e3
-struct _DnfCommandLeaves
6cb0e3
-{
6cb0e3
-  PeasExtensionBase parent_instance;
6cb0e3
-};
6cb0e3
-
6cb0e3
-static void dnf_command_leaves_iface_init (DnfCommandInterface *iface);
6cb0e3
-
6cb0e3
-G_DEFINE_DYNAMIC_TYPE_EXTENDED (DnfCommandLeaves,
6cb0e3
-                                dnf_command_leaves,
6cb0e3
-                                PEAS_TYPE_EXTENSION_BASE,
6cb0e3
-                                0,
6cb0e3
-                                G_IMPLEMENT_INTERFACE (DNF_TYPE_COMMAND,
6cb0e3
-                                                       dnf_command_leaves_iface_init))
6cb0e3
-
6cb0e3
-static void
6cb0e3
-dnf_command_leaves_init (DnfCommandLeaves *self)
6cb0e3
-{
6cb0e3
-}
6cb0e3
-
6cb0e3
-static void
6cb0e3
-disable_available_repos (DnfContext *ctx)
6cb0e3
-{
6cb0e3
-  const GPtrArray *repos = dnf_context_get_repos (ctx);
6cb0e3
-
6cb0e3
-  for (guint i = 0; i < repos->len; ++i)
6cb0e3
-    {
6cb0e3
-      DnfRepo *repo = g_ptr_array_index (repos, i);
6cb0e3
-      dnf_repo_set_enabled (repo, DNF_REPO_ENABLED_NONE);
6cb0e3
-    }
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gint
6cb0e3
-gptrarr_dnf_package_cmp (gconstpointer a, gconstpointer b)
6cb0e3
-{
6cb0e3
-  DnfPackage *const *x = a;
6cb0e3
-  DnfPackage *const *y = b;
6cb0e3
-  return dnf_package_cmp (*x, *y);
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gint
6cb0e3
-gptrarr_first_package_cmp (gconstpointer a, gconstpointer b)
6cb0e3
-{
6cb0e3
-  IdxArray *const *x = a;
6cb0e3
-  IdxArray *const *y = b;
6cb0e3
-  guint i = (*x)->idx[0];
6cb0e3
-  guint j = (*y)->idx[0];
6cb0e3
-
6cb0e3
-  if (i < j)
6cb0e3
-    return -1;
6cb0e3
-  return i > j;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static gboolean
6cb0e3
-dnf_command_leaves_run (DnfCommand      *cmd,
6cb0e3
-                        int              argc,
6cb0e3
-                        char            *argv[],
6cb0e3
-                        GOptionContext  *opt_ctx,
6cb0e3
-                        DnfContext      *ctx,
6cb0e3
-                        GError         **error)
6cb0e3
-{
6cb0e3
-  if (!g_option_context_parse (opt_ctx, &argc, &argv, error))
6cb0e3
-    return FALSE;
6cb0e3
-
6cb0e3
-  // only look at installed packages
6cb0e3
-  disable_available_repos (ctx);
6cb0e3
-  if (!dnf_context_setup_sack_with_flags (ctx,
6cb0e3
-                                          dnf_context_get_state (ctx),
6cb0e3
-                                          DNF_CONTEXT_SETUP_SACK_FLAG_NONE,
6cb0e3
-                                          error)) {
6cb0e3
-
6cb0e3
-      return FALSE;
6cb0e3
-  }
6cb0e3
-
6cb0e3
-  // get a sorted array of all installed packages
6cb0e3
-  hy_autoquery HyQuery query = hy_query_create (dnf_context_get_sack (ctx));
6cb0e3
-  g_autoptr(GPtrArray) pkgs = hy_query_run (query);
6cb0e3
-  g_ptr_array_sort (pkgs, gptrarr_dnf_package_cmp);
6cb0e3
-
6cb0e3
-  // build the directed graph of dependencies
6cb0e3
-  g_autoptr(GPtrArray) graph = build_graph (query, pkgs);
6cb0e3
-
6cb0e3
-  // run Kosaraju's algorithm to find strongly connected components
6cb0e3
-  // withhout any incoming edges
6cb0e3
-  g_autoptr(GPtrArray) leaves = kosaraju (graph);
6cb0e3
-  g_ptr_array_sort (leaves, gptrarr_first_package_cmp);
6cb0e3
-
6cb0e3
-  // print the packages grouped by their components
6cb0e3
-  for (guint i = 0; i < leaves->len; i++)
6cb0e3
-    {
6cb0e3
-      const IdxArray *scc = g_ptr_array_index (leaves, i);
6cb0e3
-      gchar mark = '-';
6cb0e3
-
6cb0e3
-      for (guint j = 0; j < scc->len; j++)
6cb0e3
-        {
6cb0e3
-          DnfPackage *pkg = g_ptr_array_index (pkgs, scc->idx[j]);
6cb0e3
-          g_print ("%c %s\n", mark, dnf_package_get_nevra (pkg));
6cb0e3
-          mark = ' ';
6cb0e3
-        }
6cb0e3
-    }
6cb0e3
-
6cb0e3
-  return TRUE;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static void
6cb0e3
-dnf_command_leaves_class_init (DnfCommandLeavesClass *klass)
6cb0e3
-{
6cb0e3
-}
6cb0e3
-
6cb0e3
-static void
6cb0e3
-dnf_command_leaves_iface_init (DnfCommandInterface *iface)
6cb0e3
-{
6cb0e3
-  iface->run = dnf_command_leaves_run;
6cb0e3
-}
6cb0e3
-
6cb0e3
-static void
6cb0e3
-dnf_command_leaves_class_finalize (DnfCommandLeavesClass *klass)
6cb0e3
-{
6cb0e3
-}
6cb0e3
-
6cb0e3
-G_MODULE_EXPORT void
6cb0e3
-dnf_command_leaves_register_types (PeasObjectModule *module)
6cb0e3
-{
6cb0e3
-  dnf_command_leaves_register_type (G_TYPE_MODULE (module));
6cb0e3
-
6cb0e3
-  peas_object_module_register_extension_type (module,
6cb0e3
-                                              DNF_TYPE_COMMAND,
6cb0e3
-                                              DNF_TYPE_COMMAND_LEAVES);
6cb0e3
-}
6cb0e3
diff --git a/dnf/plugins/leaves/dnf-command-leaves.gresource.xml b/dnf/plugins/leaves/dnf-command-leaves.gresource.xml
6cb0e3
deleted file mode 100644
6cb0e3
index b679fb6..0000000
6cb0e3
--- a/dnf/plugins/leaves/dnf-command-leaves.gresource.xml
6cb0e3
+++ /dev/null
6cb0e3
@@ -1,6 +0,0 @@
6cb0e3
-
6cb0e3
-<gresources>
6cb0e3
-  <gresource prefix="/org/fedoraproject/dnf/plugins/leaves">
6cb0e3
-    <file>leaves.plugin</file>
6cb0e3
-  </gresource>
6cb0e3
-</gresources>
6cb0e3
diff --git a/dnf/plugins/leaves/dnf-command-leaves.h b/dnf/plugins/leaves/dnf-command-leaves.h
6cb0e3
deleted file mode 100644
6cb0e3
index e78c857..0000000
6cb0e3
--- a/dnf/plugins/leaves/dnf-command-leaves.h
6cb0e3
+++ /dev/null
6cb0e3
@@ -1,31 +0,0 @@
6cb0e3
-/* dnf-command-leaves.h
6cb0e3
- *
6cb0e3
- * Copyright © 2022 Emil Renner Berthing <esmil@mailme.dk>
6cb0e3
- *
6cb0e3
- * This program is free software: you can redistribute it and/or modify
6cb0e3
- * it under the terms of the GNU General Public License as published by
6cb0e3
- * the Free Software Foundation, either version 2 of the License, or
6cb0e3
- * (at your option) any later version.
6cb0e3
- *
6cb0e3
- * This program is distributed in the hope that it will be useful,
6cb0e3
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
6cb0e3
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6cb0e3
- * GNU General Public License for more details.
6cb0e3
- *
6cb0e3
- * You should have received a copy of the GNU General Public License
6cb0e3
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
6cb0e3
- */
6cb0e3
-
6cb0e3
-#pragma once
6cb0e3
-
6cb0e3
-#include "dnf-command.h"
6cb0e3
-#include <libpeas/peas.h>
6cb0e3
-
6cb0e3
-G_BEGIN_DECLS
6cb0e3
-
6cb0e3
-#define DNF_TYPE_COMMAND_LEAVES dnf_command_leaves_get_type ()
6cb0e3
-G_DECLARE_FINAL_TYPE (DnfCommandLeaves, dnf_command_leaves, DNF, COMMAND_LEAVES, PeasExtensionBase)
6cb0e3
-
6cb0e3
-G_MODULE_EXPORT void dnf_command_leaves_register_types (PeasObjectModule *module);
6cb0e3
-
6cb0e3
-G_END_DECLS
6cb0e3
diff --git a/dnf/plugins/leaves/leaves.plugin b/dnf/plugins/leaves/leaves.plugin
6cb0e3
deleted file mode 100644
6cb0e3
index 4deb320..0000000
6cb0e3
--- a/dnf/plugins/leaves/leaves.plugin
6cb0e3
+++ /dev/null
6cb0e3
@@ -1,9 +0,0 @@
6cb0e3
-[Plugin]
6cb0e3
-Module = command_leaves
6cb0e3
-Embedded = dnf_command_leaves_register_types
6cb0e3
-Name = leaves
6cb0e3
-Description = List installed packages not required by other installed packages
6cb0e3
-Authors = Emil Renner Berthing <esmil@mailme.dk>
6cb0e3
-License = GPL-2.0+
6cb0e3
-Copyright = Copyright (C) 2022 Emil Renner Berthing
6cb0e3
-X-Command-Syntax = leaves
6cb0e3
-- 
6cb0e3
2.37.3
6cb0e3