Bug 1396192 - Print message if package is already installed when installing package by provides
Summary: Print message if package is already installed when installing package by prov...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: All
OS: Linux
low
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-17 17:24 UTC by Pat Riehecky
Modified: 2016-11-21 12:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-21 12:22:32 UTC
Type: Bug


Attachments (Terms of Use)

Description Pat Riehecky 2016-11-17 17:24:53 UTC
Description of problem:
When using DNF to determine if a "package" is installed doesn't consider any RPM provides.  This can lead to some odd behavior in config management tools as well as user actions.

Version-Release number of selected component (if applicable):dnf-2.0.0-0.rc1.4.fc26


How reproducible:100%


Steps to Reproduce:
1. Install Fedora
2. rpm -q --provides systemd (should provide 'syslog')
3. dnf list installed syslog (shows not installed)
4. dnf install syslog (result is 'Nothing to do.')

Actual results:
[root@fdeebbd6f397 /]# dnf list installed syslog
Last metadata expiration check: 0:05:39 ago on Thu Nov 17 17:18:26 2016.
Error: No matching Packages to list
[root@fdeebbd6f397 /]# dnf install syslog
Last metadata expiration check: 0:05:43 ago on Thu Nov 17 17:18:26 2016.
<snip>
Transaction Summary
================================================================================
Skip  5 Packages

Nothing to do.
Complete!
[root@fdeebbd6f397 /]# 

Expected results:
'dnf list installed' should also consider RPM provides

Additional info:

Comment 1 Panu Matilainen 2016-11-18 07:47:10 UTC
Eek, heck no. Provides are provides and should remain hidden unless specifically asked for, just like with rpm and yum and...

Dnf could be more informative than the rather terrible "nothing to do" message however, it could explain WHY, eg:

"syslog is already installed (provided by systemd)"

Comment 2 Igor Gnatenko 2016-11-21 12:22:32 UTC
actually we already print message:
$ sudo dnf install syslog
[sudo] password for brain: 
Last metadata expiration check: 0:00:00 ago on Mon Nov 21 13:17:27 2016 CET.
Package systemd-231-11.fc26.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!


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