Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1292892 - dnf groupinstall ignores errors
Summary: dnf groupinstall ignores errors
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-18 16:21 UTC by Mike McLean
Modified: 2018-03-14 01:56 UTC (History)
6 users (show)

Fixed In Version: dnf-1.1.9-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-22 02:25:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
comps file (deleted)
2015-12-18 16:22 UTC, Mike McLean
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1461539 0 unspecified CLOSED Provide broken/missing group package behaviour identical to yum's (accept missing packages, fail on broken packages) 2022-09-02 20:22:13 UTC

Internal Links: 1461539

Description Mike McLean 2015-12-18 16:21:11 UTC
Using dnf-1.1.4-2.fc22.noarch

When using dnf groupinstall, missing dependencies are quietly ignored and the command exits without error. I've found two situations where dnf is asked to perform a group install, fails to do so, but give no indication of failure.

1) when the group install encounters missing deps
2) when the group refers directly to a missing package

I first encountered this within mock, but I have replicated it outside of mock.
I did this locally by creating a repo containing a single package with an unsatisfied dep, and a comps file with two groups. One group contains the given package. The other refers to a package that does not exist.

Here are the results:

[root@localhost]# dnf -y groupinstall missing-deps && echo OK
Last metadata expiration check performed 0:11:18 ago on Fri Dec 18 11:04:56 2015.
Dependencies resolved.
================================================================================================================
 Group                                       Packages                                                          
================================================================================================================
Marking installed:
 missing-deps                                fake                                                              
Complete!
OK
[root@localhost]# rpm -q fake
package fake is not installed


[root@localhost]# dnf -y groupinstall no-such-package && echo OK
Last metadata expiration check performed 0:11:40 ago on Fri Dec 18 11:04:56 2015.
Dependencies resolved.
================================================================================================================
 Group                                      Packages                                                           
================================================================================================================
Marking installed:
 no-such-package                            NOSUCHPACKAGE                                                      
Complete!
OK
[root@localhost]# rpm -q NOSUCHPACKAGE
package NOSUCHPACKAGE is not installed

Comment 1 Mike McLean 2015-12-18 16:22:43 UTC
Created attachment 1107220 [details]
comps file

Comment 2 Mike McLean 2015-12-18 16:42:56 UTC
I should also note that even at debuglevel=10, there is no hint that something is amiss.

Comment 3 Mike McLean 2015-12-18 16:46:27 UTC
yum-deprecated behaves more sanely here.

In case 1, it reports the missing dependency and exits with an error
[root@localhost]# yum-deprecated -y groupinstall missing-deps ; echo "Exit code $?"
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Loaded plugins: auto-update-debuginfo, langpacks
Resolving Dependencies
--> Running transaction check
---> Package fake.x86_64 0:1.0-20 will be installed
--> Processing Dependency: nosuchpackage > 8192 for package: fake-1.0-20.x86_64
--> Finished Dependency Resolution
Error: Package: fake-1.0-20.x86_64 (fake)
           Requires: nosuchpackage > 8192
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Exit code 1

In case 2, it exits cleanly, but prints a warning.
# yum-deprecated -y groupinstall no-such-package ; echo "Exit code $?"
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Loaded plugins: auto-update-debuginfo, langpacks
Warning: Group no-such-package does not have any packages to install.
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
Exit code 0

Comment 4 Fedora Update System 2016-05-19 11:08:36 UTC
dnf-plugins-core-0.1.21-1.fc24 dnf-1.1.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1efd7bc386

Comment 5 Fedora Update System 2016-05-19 11:10:41 UTC
dnf-1.1.9-1.fc23 dnf-plugins-core-0.1.21-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bb69db975e

Comment 6 Fedora Update System 2016-05-21 01:33:18 UTC
dnf-1.1.9-1.fc24, dnf-plugins-core-0.1.21-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1efd7bc386

Comment 7 Fedora Update System 2016-05-21 02:27:34 UTC
dnf-1.1.9-1.fc23, dnf-plugins-core-0.1.21-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bb69db975e

Comment 8 Fedora Update System 2016-05-22 02:24:31 UTC
dnf-1.1.9-1.fc23, dnf-plugins-core-0.1.21-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.