Bug 1350546

Summary: print more useful info when package can not be installed
Product: [Fedora] Fedora Reporter: morgan read <mstuff>
Component: dnfAssignee: rpm-software-management
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 24CC: jmracek, mluscon, mmraka, packaging-team-maint, vmukhame
Target Milestone: ---Keywords: Reopened, Triaged, UserExperience
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-2.5.0-2.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-09 19:06:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
installed-software-names_20160626.log
none
dnf_output-1.txt none

Description morgan read 2016-06-27 18:02:38 UTC
Created attachment 1173069 [details]
installed-software-names_20160626.log

Description of problem:
With the attached file installed-software-names_20160626.log

# dnf install $(cat installed-software-names_20160626.log)

Produces the attached output dnf_output-1.txt

And fails to install missing packages - eg, wine exists in installed-software-names_20160626.log, does not exist in dnf_output-1.txt and is not installed:
# dnf list wine
Last metadata expiration check: 1:55:16 ago on Mon Jun 27 16:57:32 2016.
Available Packages
wine.i686                                              1.9.12-1.fc24                                             updates
wine.x86_64                                            1.9.12-1.fc24                                             updates

Version-Release number of selected component (if applicable):
# rpm -qa dnf
dnf-1.1.9-2.fc24.noarch

How reproducible:
Always

Steps to Reproduce:
1. Produce a list "list" of packages to install
2. Run # dnf install $(cat list)
3. As above

Actual results:
Nothing installed

Expected results:
Missing packages from list installed

Additional info:
https://ask.fedoraproject.org/en/question/77770/is-it-possible-to-get-dnf-to-install-packages-listed-in-a-text-file/

Comment 1 morgan read 2016-06-27 18:03:26 UTC
Created attachment 1173070 [details]
dnf_output-1.txt

Comment 2 Michael Mráka 2016-06-28 06:31:48 UTC
Dnf install fails (by default) if one of the packages on commandline can't be installed. And there's a lot of them in your file.

If you want dnf to ignore missing packages use
dnf install --setopt strict=false $(cat installed-software-names_20160626.log)

Comment 3 morgan read 2016-06-30 09:04:18 UTC
Very many thanks

Comment 4 morgan read 2016-07-10 11:06:59 UTC
I wonder if this 'notabug' is in fact a bug - the bug being that dnf fails silently under this use scenario rather than providing some meaningful output?

Reopening in the hope of a positive response.

Comment 5 Jaroslav Mracek 2017-05-12 19:46:09 UTC
I think this problem will be fixed by my patch https://github.com/rpm-software-management/dnf/pull/782. Hope that it helps

Comment 6 Fedora Update System 2017-05-22 12:41:48 UTC
dnf-plugins-extras-2.0.1-1.fc26 dnf-plugins-core-2.1.0-1.fc26 libdnf-0.9.0-1.fc26 dnf-2.5.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8

Comment 7 Fedora Update System 2017-05-22 16:40:29 UTC
dnf-2.5.0-1.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 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-2017-92e5a01da8

Comment 8 Fedora Update System 2017-05-24 08:32:51 UTC
dnf-2.5.0-1.fc26 dnf-plugins-core-2.1.0-1.fc26 dnf-plugins-extras-2.0.1-1.fc26 dnfdaemon-0.3.17-3.fc26 libdnf-0.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8

Comment 9 Fedora Update System 2017-05-24 14:33:39 UTC
dnf-2.5.0-2.fc26 dnf-plugins-core-2.1.0-1.fc26 dnf-plugins-extras-2.0.1-1.fc26 dnfdaemon-0.3.18-1.fc26 libdnf-0.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-92e5a01da8

Comment 10 Fedora Update System 2017-05-25 19:18:01 UTC
dnf-2.5.0-2.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, dnfdaemon-0.3.18-2.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 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-2017-92e5a01da8

Comment 11 Fedora Update System 2017-06-09 19:06:37 UTC
dnf-2.5.0-2.fc26, dnf-plugins-core-2.1.0-1.fc26, dnf-plugins-extras-2.0.1-1.fc26, dnfdaemon-0.3.18-2.fc26, libdnf-0.9.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.