Bug 1292892 - dnf groupinstall ignores errors
dnf groupinstall ignores errors
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-18 11:21 EST by Mike McLean
Modified: 2016-05-21 22:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: dnf-1.1.9-1.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-21 22:25:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
comps file (700 bytes, application/xml)
2015-12-18 11:22 EST, Mike McLean
no flags Details

  None (edit)
Description Mike McLean 2015-12-18 11:21:11 EST
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 11:22 EST
Created attachment 1107220 [details]
comps file
Comment 2 Mike McLean 2015-12-18 11:42:56 EST
I should also note that even at debuglevel=10, there is no hint that something is amiss.
Comment 3 Mike McLean 2015-12-18 11:46:27 EST
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 07:08:36 EDT
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 07:10:41 EDT
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-20 21:33:18 EDT
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-20 22:27:34 EDT
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-21 22:24:31 EDT
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.