NOTE: This bug report concerns the install_specs branch of DNF, where the API Anaconda needs for module installation support is being stabilized. (https://github.com/mhatina/dnf/tree/install_specs) I'm also using libdnf-0.11.1-1.git.1585.5244e5d.fc28.x86_64.rpm together with the DNF branch. Description of problem: Previously we used to add individual package and group requirements one by one to the DNF transaction, so we also got any errors immediately after we tried to add an invalid requirement, such as a missing/non-existing package/group. This is also how the --ignoremissing flag for the --packages section[0] has been implemented, Anaconda simply ignored any package-missing errors DNF raised. On the other hand, when using the install_specs() function, will gather all package/group/module include & exclude specs and pass them to DNF. Turns out this is a problem for implementing the --ignoremissing functionality, as any error in what we have requested from DNF (such as a missing/non-existing package/group) will abort the whole DNF transaction. In short, we need to be able to tell dnf to ignore missing groups/packages when needed. Ideally just some flag we would pass to DNF to switch it to this mode. On a related note, it would still be good to record any packages/groups that have been ignored in this way - DNF could log these or provide a list of ignored packages/groups, maybe as a return value of the install_specs() function or possibly as a property of the Base instance, etc. Version-Release number of selected component (if applicable): commit 1263ddc0ebf7bcc6496d90225ddaca4fdf47c1f1 (HEAD -> install_specs, mhatina/install_specs) Author: Martin Hatina <mhatina> Date: Tue May 29 13:37:27 2018 +0200 How reproducible: always Steps to Reproduce: 1. request at least one missing/not-existing package via install_specs() function Actual results: The call fails and there is nothing that can be really done about it. Expected results: It should be possible to tell DNF to ignore missing packages/groups so that install_specs() can be called with missing packages. [0] http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-6-package-selection
This is the traceback from DNF that happens if a missing/not-existing package is requested via install_specs(): File "/tmp/updates/pyanaconda/payload/dnfpayload.py", line 562, in _apply_selections self._base.install_specs(install=include_list, exclude=exclude_list) File "/tmp/updates/dnf/base.py", line 1857, in install_specs self.install(spec, strict=self.conf.strict) File "/tmp/updates/dnf/base.py", line 1913, in install raise dnf.exceptions.MarkingError(_('no package matched'), pkg_spec) dnf.exceptions.MarkingError: no package matched
Created attachment 1447379 [details] packaging.log from the installation attempt
Created attachment 1447380 [details] anaconda.log from the installation attempt
Fixed in https://github.com/mhatina/dnf/tree/install_specs