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

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