Blame SOURCES/0011-Add-new-command-modulesync-RhBug1868047.patch

5a4a77
From 6ea94d9c768eb45975f314e11ab9dd88284fa380 Mon Sep 17 00:00:00 2001
5a4a77
From: Jaroslav Mracek <jmracek@redhat.com>
5a4a77
Date: Mon, 27 Sep 2021 11:29:01 +0200
5a4a77
Subject: [PATCH] Add new command modulesync (RhBug:1868047)
5a4a77
5a4a77
It will download module metadata from all enabled repositories,
5a4a77
module artifacts and profiles of matching modules. Then it creates
5a4a77
a repository.
5a4a77
5a4a77
= changelog =
5a4a77
msg:           Add a new subpackage with modulesync command. The command
5a4a77
downloads packages from modules and/or creates a repository with modular
5a4a77
data.
5a4a77
type:          enhancement
5a4a77
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=1868047
5a4a77
---
5a4a77
 dnf-plugins-core.spec  |  20 ++++++++++++++++++++
5a4a77
 doc/CMakeLists.txt     |   1 +
5a4a77
 doc/conf.py            |   1 +
5a4a77
 doc/index.rst          |   1 +
5a4a77
 doc/modulesync.rst     | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5a4a77
 plugins/CMakeLists.txt |   1 +
5a4a77
 plugins/modulesync.py  | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5a4a77
 7 files changed, 335 insertions(+)
5a4a77
 create mode 100644 doc/modulesync.rst
5a4a77
 create mode 100644 plugins/modulesync.py
5a4a77
5a4a77
diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec
5a4a77
index cef836f..afdbcbb 100644
5a4a77
--- a/dnf-plugins-core.spec
5a4a77
+++ b/dnf-plugins-core.spec
5a4a77
@@ -402,6 +402,19 @@ versions of those packages. This allows you to e.g. protect packages from being
5a4a77
 updated by newer versions.
5a4a77
 %endif
5a4a77
 
5a4a77
+%if %{with python3}
5a4a77
+%package -n python3-dnf-plugin-modulesync
5a4a77
+Summary:        Download module metadata and packages and create repository
5a4a77
+Requires:       python3-%{name} = %{version}-%{release}
5a4a77
+Requires:       createrepo_c >= 0.17.4
5a4a77
+Provides:       dnf-plugin-modulesync =  %{version}-%{release}
5a4a77
+Provides:       dnf-command(modulesync)
5a4a77
+
5a4a77
+%description -n python3-dnf-plugin-modulesync
5a4a77
+Download module metadata from all enabled repositories, module artifacts and profiles of matching modules and create
5a4a77
+repository.
5a4a77
+%endif
5a4a77
+
5a4a77
 %prep
5a4a77
 %autosetup
5a4a77
 %if %{with python2}
5a4a77
@@ -762,6 +775,13 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
5a4a77
 %endif
5a4a77
 %endif
5a4a77
 
5a4a77
+%if %{with python3}
5a4a77
+%files -n python3-dnf-plugin-modulesync
5a4a77
+%{python3_sitelib}/dnf-plugins/modulesync.*
5a4a77
+%{python3_sitelib}/dnf-plugins/__pycache__/modulesync.*
5a4a77
+%{_mandir}/man8/dnf-modulesync.*
5a4a77
+%endif
5a4a77
+
5a4a77
 %changelog
5a4a77
 * Mon Apr 12 2021 Nicola Sella <nsella@redhat.com> - 4.0.21-1
5a4a77
 - Add missing command line option to documentation
5a4a77
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
5a4a77
index 3fb665d..ff84cf8 100644
5a4a77
--- a/doc/CMakeLists.txt
5a4a77
+++ b/doc/CMakeLists.txt
5a4a77
@@ -28,6 +28,7 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/dnf-builddep.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-generate_completion_cache.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-groups-manager.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-leaves.8
5a4a77
+    ${CMAKE_CURRENT_BINARY_DIR}/dnf-modulesync.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-needs-restarting.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-repoclosure.8
5a4a77
     ${CMAKE_CURRENT_BINARY_DIR}/dnf-repodiff.8
5a4a77
diff --git a/doc/conf.py b/doc/conf.py
5a4a77
index 645185a..41d6936 100644
5a4a77
--- a/doc/conf.py
5a4a77
+++ b/doc/conf.py
5a4a77
@@ -254,6 +254,7 @@ man_pages = [
5a4a77
     ('groups-manager', 'dnf-groups-manager', u'DNF groups-manager Plugin', AUTHORS, 8),
5a4a77
     ('leaves', 'dnf-leaves', u'DNF leaves Plugin', AUTHORS, 8),
5a4a77
     ('local', 'dnf-local', u'DNF local Plugin', AUTHORS, 8),
5a4a77
+    ('modulesync', 'dnf-modulesync', u'DNF modulesync Plugin', AUTHORS, 8),
5a4a77
     ('needs_restarting', 'dnf-needs-restarting', u'DNF needs_restarting Plugin', AUTHORS, 8),
5a4a77
     ('repoclosure', 'dnf-repoclosure', u'DNF repoclosure Plugin', AUTHORS, 8),
5a4a77
     ('repodiff', 'dnf-repodiff', u'DNF repodiff Plugin', AUTHORS, 8),
5a4a77
diff --git a/doc/index.rst b/doc/index.rst
5a4a77
index 7213253..07f6052 100644
5a4a77
--- a/doc/index.rst
5a4a77
+++ b/doc/index.rst
5a4a77
@@ -37,6 +37,7 @@ This documents core plugins of DNF:
5a4a77
    leaves
5a4a77
    local
5a4a77
    migrate
5a4a77
+   modulesync
5a4a77
    needs_restarting
5a4a77
    post-transaction-actions
5a4a77
    repoclosure
5a4a77
diff --git a/doc/modulesync.rst b/doc/modulesync.rst
5a4a77
new file mode 100644
5a4a77
index 0000000..2837287
5a4a77
--- /dev/null
5a4a77
+++ b/doc/modulesync.rst
5a4a77
@@ -0,0 +1,103 @@
5a4a77
+..
5a4a77
+  Copyright (C) 2015  Red Hat, Inc.
5a4a77
+
5a4a77
+  This copyrighted material is made available to anyone wishing to use,
5a4a77
+  modify, copy, or redistribute it subject to the terms and conditions of
5a4a77
+  the GNU General Public License v.2, or (at your option) any later version.
5a4a77
+  This program is distributed in the hope that it will be useful, but WITHOUT
5a4a77
+  ANY WARRANTY expressed or implied, including the implied warranties of
5a4a77
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
5a4a77
+  Public License for more details.  You should have received a copy of the
5a4a77
+  GNU General Public License along with this program; if not, write to the
5a4a77
+  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
5a4a77
+  02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
5a4a77
+  source code or documentation are not subject to the GNU General Public
5a4a77
+  License and may only be used or replicated with the express permission of
5a4a77
+  Red Hat, Inc.
5a4a77
+
5a4a77
+====================
5a4a77
+DNF modulesync Plugin
5a4a77
+====================
5a4a77
+
5a4a77
+Download packages from modules and/or create a repository with modular data.
5a4a77
+
5a4a77
+--------
5a4a77
+Synopsis
5a4a77
+--------
5a4a77
+
5a4a77
+``dnf modulesync [options] [<module-spec>...]``
5a4a77
+
5a4a77
+-----------
5a4a77
+Description
5a4a77
+-----------
5a4a77
+
5a4a77
+`modulesync` downloads packages from modules according to provided arguments and creates a repository with modular data
5a4a77
+in working directory. In environment with modules it is recommend to use the command for redistribution of packages,
5a4a77
+because DNF does not allow installation of modular packages without modular metadata on the system (Fail-safe
5a4a77
+mechanism). The command without an argument creates a repository like `createrepo_c` but with modular metadata collected
5a4a77
+from all available repositories.
5a4a77
+
5a4a77
+See examples.
5a4a77
+
5a4a77
+---------
5a4a77
+Arguments
5a4a77
+---------
5a4a77
+
5a4a77
+``<module-spec>``
5a4a77
+    Module specification for the package to download. The argument is an optional.
5a4a77
+
5a4a77
+-------
5a4a77
+Options
5a4a77
+-------
5a4a77
+
5a4a77
+All general DNF options are accepted. Namely, the ``--destdir`` option can be used to specify directory where packages
5a4a77
+will be downloaded and the new repository created. See `Options` in :manpage:`dnf(8)` for details.
5a4a77
+
5a4a77
+
5a4a77
+``-n, --newest-only``
5a4a77
+    Download only packages from the newest modules.
5a4a77
+
5a4a77
+``--enable_source_repos``
5a4a77
+    Enable repositories with source packages
5a4a77
+
5a4a77
+``--enable_debug_repos``
5a4a77
+    Enable repositories with debug-info and debug-source packages
5a4a77
+
5a4a77
+``--resolve``
5a4a77
+    Resolve and download needed dependencies
5a4a77
+
5a4a77
+--------
5a4a77
+Examples
5a4a77
+--------
5a4a77
+
5a4a77
+``dnf modulesync nodejs``
5a4a77
+    Download packages from `nodejs` module and crete a repository with modular metadata in working directory
5a4a77
+
5a4a77
+``dnf download nodejs``
5a4a77
+
5a4a77
+``dnf modulesync``
5a4a77
+    The first `download` command downloads nodejs package into working directory. In environment with modules `nodejs`
5a4a77
+    package can be a modular package therefore when I create a repository I have to insert also modular metadata
5a4a77
+    from available repositories to ensure 100% functionality. Instead of `createrepo_c` use `dnf modulesync`
5a4a77
+    to create a repository in working directory with nodejs package and modular metadata.
5a4a77
+
5a4a77
+``dnf --destdir=/tmp/my-temp modulesync nodejs:14/minimal --resolve``
5a4a77
+    Download package required for installation of `minimal` profile from module `nodejs` and stream `14` into directory
5a4a77
+    `/tmp/my-temp` and all required dependencies. Then it will create a repository in `/tmp/my-temp` directory with
5a4a77
+    previously downloaded packages and modular metadata from all available repositories.
5a4a77
+
5a4a77
+``dnf module install nodejs:14/minimal --downloadonly --destdir=/tmp/my-temp``
5a4a77
+
5a4a77
+``dnf modulesync --destdir=/tmp/my-temp``
5a4a77
+    The first `dnf module install` command downloads package from required for installation of `minimal` profile from module
5a4a77
+    `nodejs` and stream `14` into directory `/tmp/my-temp`. The second command `dnf modulesync` will create
5a4a77
+    a repository in `/tmp/my-temp` directory with previously downloaded packages and modular metadata from all
5a4a77
+    available repositories. In comparison to `dnf --destdir=/tmp/my-temp modulesync nodejs:14/minimal --resolve` it will
5a4a77
+    only download packages required for installation on current system.
5a4a77
+
5a4a77
+
5a4a77
+--------
5a4a77
+See Also
5a4a77
+--------
5a4a77
+
5a4a77
+* :manpage:`dnf(8)`, DNF Command Reference
5a4a77
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
5a4a77
index f66d3df..59f148f 100644
5a4a77
--- a/plugins/CMakeLists.txt
5a4a77
+++ b/plugins/CMakeLists.txt
5a4a77
@@ -22,6 +22,7 @@ INSTALL (FILES repograph.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
 INSTALL (FILES repomanage.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
 INSTALL (FILES reposync.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
 INSTALL (FILES show_leaves.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
+INSTALL (FILES modulesync.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
 INSTALL (FILES versionlock.py DESTINATION ${PYTHON_INSTALL_DIR}/dnf-plugins)
5a4a77
 
5a4a77
 ADD_SUBDIRECTORY (dnfpluginscore)
5a4a77
diff --git a/plugins/modulesync.py b/plugins/modulesync.py
5a4a77
new file mode 100644
5a4a77
index 0000000..c1c33e4
5a4a77
--- /dev/null
5a4a77
+++ b/plugins/modulesync.py
5a4a77
@@ -0,0 +1,208 @@
5a4a77
+# Copyright (C) 2021  Red Hat, Inc.
5a4a77
+#
5a4a77
+# This copyrighted material is made available to anyone wishing to use,
5a4a77
+# modify, copy, or redistribute it subject to the terms and conditions of
5a4a77
+# the GNU General Public License v.2, or (at your option) any later version.
5a4a77
+# This program is distributed in the hope that it will be useful, but WITHOUT
5a4a77
+# ANY WARRANTY expressed or implied, including the implied warranties of
5a4a77
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
5a4a77
+# Public License for more details.  You should have received a copy of the
5a4a77
+# GNU General Public License along with this program; if not, write to the
5a4a77
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
5a4a77
+# 02110-1301, USA.  Any Red Hat trademarks that are incorporated in the
5a4a77
+# source code or documentation are not subject to the GNU General Public
5a4a77
+# License and may only be used or replicated with the express permission of
5a4a77
+# Red Hat, Inc.
5a4a77
+#
5a4a77
+
5a4a77
+from __future__ import absolute_import
5a4a77
+from __future__ import unicode_literals
5a4a77
+from dnfpluginscore import _, P_, logger
5a4a77
+from dnf.cli.option_parser import OptionParser
5a4a77
+
5a4a77
+import os
5a4a77
+import shutil
5a4a77
+import subprocess
5a4a77
+
5a4a77
+import dnf
5a4a77
+import dnf.cli
5a4a77
+import dnf.i18n
5a4a77
+import hawkey
5a4a77
+
5a4a77
+
5a4a77
+@dnf.plugin.register_command
5a4a77
+class SyncToolCommand(dnf.cli.Command):
5a4a77
+
5a4a77
+    aliases = ['modulesync']
5a4a77
+    summary = _('Download packages from modules and/or create a repository with modular data')
5a4a77
+
5a4a77
+    def __init__(self, cli):
5a4a77
+        super(SyncToolCommand, self).__init__(cli)
5a4a77
+
5a4a77
+    @staticmethod
5a4a77
+    def set_argparser(parser):
5a4a77
+        parser.add_argument('module', nargs='*', metavar=_('MODULE'),
5a4a77
+                            help=_('modules to download'))
5a4a77
+        parser.add_argument("--enable_source_repos", action='store_true',
5a4a77
+                            help=_('enable repositories with source packages'))
5a4a77
+        parser.add_argument("--enable_debug_repos", action='store_true',
5a4a77
+                            help=_('enable repositories with debug-info and debug-source packages'))
5a4a77
+        parser.add_argument('--resolve', action='store_true',
5a4a77
+                            help=_('resolve and download needed dependencies'))
5a4a77
+        parser.add_argument('-n', '--newest-only', default=False, action='store_true',
5a4a77
+                            help=_('download only packages from newest modules'))
5a4a77
+
5a4a77
+    def configure(self):
5a4a77
+        # setup sack and populate it with enabled repos
5a4a77
+        demands = self.cli.demands
5a4a77
+        demands.sack_activation = True
5a4a77
+        demands.available_repos = True
5a4a77
+
5a4a77
+        demands.load_system_repo = False
5a4a77
+
5a4a77
+        if self.opts.enable_source_repos:
5a4a77
+            self.base.repos.enable_source_repos()
5a4a77
+
5a4a77
+        if self.opts.enable_debug_repos:
5a4a77
+            self.base.repos.enable_debug_repos()
5a4a77
+
5a4a77
+        if self.opts.destdir:
5a4a77
+            self.base.conf.destdir = self.opts.destdir
5a4a77
+        else:
5a4a77
+            self.base.conf.destdir = dnf.i18n.ucd(os.getcwd())
5a4a77
+
5a4a77
+    def run(self):
5a4a77
+        """Execute the util action here."""
5a4a77
+
5a4a77
+        pkgs = self.base.sack.query().filterm(empty=True)
5a4a77
+        no_matched_spec = []
5a4a77
+        for module_spec in self.opts.module:
5a4a77
+            try:
5a4a77
+                pkgs = pkgs.union(self._get_packages_from_modules(module_spec))
5a4a77
+            except dnf.exceptions.Error:
5a4a77
+                no_matched_spec.append(module_spec)
5a4a77
+        if no_matched_spec:
5a4a77
+            msg = P_("Unable to find a match for argument: '{}'", "Unable to find a match for arguments: '{}'",
5a4a77
+                     len(no_matched_spec)).format("' '".join(no_matched_spec))
5a4a77
+            raise dnf.exceptions.Error(msg)
5a4a77
+
5a4a77
+        if self.opts.resolve:
5a4a77
+            pkgs = pkgs.union(self._get_providers_of_requires(pkgs))
5a4a77
+
5a4a77
+        # download rpms
5a4a77
+        self._do_downloads(pkgs)
5a4a77
+
5a4a77
+        # Create a repository at destdir with modular data
5a4a77
+        remove_tmp_moduleyamls_files = []
5a4a77
+        for repo in self.base.repos.iter_enabled():
5a4a77
+            module_md_path = repo.get_metadata_path('modules')
5a4a77
+            if module_md_path:
5a4a77
+                filename = "".join([repo.id, "-", os.path.basename(module_md_path)])
5a4a77
+                dest_path = os.path.join(self.base.conf.destdir, filename)
5a4a77
+                shutil.copy(module_md_path, dest_path)
5a4a77
+                remove_tmp_moduleyamls_files.append(dest_path)
5a4a77
+        args = ["createrepo_c", "--update", "--unique-md-filenames", self.base.conf.destdir]
5a4a77
+        p = subprocess.run(args)
5a4a77
+        if p.returncode:
5a4a77
+            msg = _("Creation of repository failed with return code {}. All downloaded content was kept on the system")
5a4a77
+            msg = msg.format(p.returncode)
5a4a77
+            raise dnf.exceptions.Error(msg)
5a4a77
+        for file_path in remove_tmp_moduleyamls_files:
5a4a77
+            os.remove(file_path)
5a4a77
+
5a4a77
+    def _do_downloads(self, pkgs):
5a4a77
+        """
5a4a77
+        Perform the download for a list of packages
5a4a77
+        """
5a4a77
+        pkg_dict = {}
5a4a77
+        for pkg in pkgs:
5a4a77
+            pkg_dict.setdefault(str(pkg), []).append(pkg)
5a4a77
+
5a4a77
+        to_download = []
5a4a77
+
5a4a77
+        for pkg_list in pkg_dict.values():
5a4a77
+            pkg_list.sort(key=lambda x: (x.repo.priority, x.repo.cost))
5a4a77
+            to_download.append(pkg_list[0])
5a4a77
+        if to_download:
5a4a77
+            self.base.download_packages(to_download, self.base.output.progress)
5a4a77
+
5a4a77
+    def _get_packages_from_modules(self, module_spec):
5a4a77
+        """Gets packages from modules matching module spec
5a4a77
+        1. From module artifacts
5a4a77
+        2. From module profiles"""
5a4a77
+        result_query = self.base.sack.query().filterm(empty=True)
5a4a77
+        module_base = dnf.module.module_base.ModuleBase(self.base)
5a4a77
+        module_list, nsvcap = module_base.get_modules(module_spec)
5a4a77
+        if self.opts.newest_only:
5a4a77
+            module_list = self.base._moduleContainer.getLatestModules(module_list, False)
5a4a77
+        for module in module_list:
5a4a77
+            for artifact in module.getArtifacts():
5a4a77
+                query = self.base.sack.query(flags=hawkey.IGNORE_EXCLUDES).filterm(nevra_strict=artifact)
5a4a77
+                if query:
5a4a77
+                    result_query = result_query.union(query)
5a4a77
+                else:
5a4a77
+                    msg = _("No match for artifact '{0}' from module '{1}'").format(
5a4a77
+                        artifact, module.getFullIdentifier())
5a4a77
+                    logger.warning(msg)
5a4a77
+            if nsvcap.profile:
5a4a77
+                profiles_set = module.getProfiles(nsvcap.profile)
5a4a77
+            else:
5a4a77
+                profiles_set = module.getProfiles()
5a4a77
+            if profiles_set:
5a4a77
+                for profile in profiles_set:
5a4a77
+                    for pkg_name in profile.getContent():
5a4a77
+                        query = self.base.sack.query(flags=hawkey.IGNORE_EXCLUDES).filterm(name=pkg_name)
5a4a77
+                        # Prefer to add modular providers selected by argument
5a4a77
+                        if result_query.intersection(query):
5a4a77
+                            continue
5a4a77
+                        # Add all packages with the same name as profile described
5a4a77
+                        elif query:
5a4a77
+                            result_query = result_query.union(query)
5a4a77
+                        else:
5a4a77
+                            msg = _("No match for package name '{0}' in profile {1} from module {2}")\
5a4a77
+                                .format(pkg_name, profile.getName(), module.getFullIdentifier())
5a4a77
+                            logger.warning(msg)
5a4a77
+        if not module_list:
5a4a77
+            msg = _("No mach for argument '{}'").format(module_spec)
5a4a77
+            raise dnf.exceptions.Error(msg)
5a4a77
+
5a4a77
+        return result_query
5a4a77
+
5a4a77
+    def _get_providers_of_requires(self, to_test, done=None, req_dict=None):
5a4a77
+        done = done if done else to_test
5a4a77
+        # req_dict = {}  {req : set(pkgs)}
5a4a77
+        if req_dict is None:
5a4a77
+            req_dict = {}
5a4a77
+        test_requires = []
5a4a77
+        for pkg in to_test:
5a4a77
+            for require in pkg.requires:
5a4a77
+                if require not in req_dict:
5a4a77
+                    test_requires.append(require)
5a4a77
+                req_dict.setdefault(require, set()).add(pkg)
5a4a77
+
5a4a77
+        if self.opts.newest_only:
5a4a77
+            #  Prepare cache with all packages related affected by modular filtering
5a4a77
+            names = set()
5a4a77
+            for module in self.base._moduleContainer.getModulePackages():
5a4a77
+                for artifact in module.getArtifacts():
5a4a77
+                    name, __, __ = artifact.rsplit("-", 2)
5a4a77
+                    names.add(name)
5a4a77
+            modular_related = self.base.sack.query(flags=hawkey.IGNORE_EXCLUDES).filterm(provides=names)
5a4a77
+
5a4a77
+        requires = self.base.sack.query().filterm(empty=True)
5a4a77
+        for require in test_requires:
5a4a77
+            q = self.base.sack.query(flags=hawkey.IGNORE_EXCLUDES).filterm(provides=require)
5a4a77
+
5a4a77
+            if not q:
5a4a77
+                #  TODO(jmracek) Shell we end with an error or with RC 1?
5a4a77
+                logger.warning((_("Unable to satisfy require {}").format(require)))
5a4a77
+            else:
5a4a77
+                if self.opts.newest_only:
5a4a77
+                    if not modular_related.intersection(q):
5a4a77
+                        q.filterm(latest_per_arch_by_priority=1)
5a4a77
+                requires = requires.union(q.difference(done))
5a4a77
+        done = done.union(requires)
5a4a77
+        if requires:
5a4a77
+            done = self._get_providers_of_requires(requires, done=done, req_dict=req_dict)
5a4a77
+
5a4a77
+        return done
5a4a77
--
5a4a77
libgit2 1.1.0
5a4a77