Bug 1401780

Summary: dnf group install with-optional doesn't pull optional packages if the group is already installed
Product: [Fedora] Fedora Reporter: dani
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: jmracek, mluscon, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-31 16:05:13 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:

Description dani 2016-12-06 05:16:59 UTC
Description of problem:
dnf group install with-optional doesn't pull optional packages if the group is already installed.

Version-Release number of selected component (if applicable):
dnf-0:1.1.10-4.fc25

How reproducible:
always

Steps to Reproduce:
1. dnf group install virtualization
2. dnf group install with-optional virtualization

Actual results:
Group 'Virtualization' is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!


Expected results:

Installing:
 guestfs-browser                                x86_64                            0.2.3-3.fc25                                  fedora                            1.3 M
 hexedit                                        x86_64                            1.2.13-8.fc24                                 fedora                             44 k
 libguestfs-tools                               noarch                            1:1.34.3-1.fc25                               fedora                             41 k
 libguestfs-tools-c                             x86_64                            1:1.34.3-1.fc25                               fedora                            3.5 M
 libguestfs-xfs                                 x86_64                            1:1.34.3-1.fc25                               fedora                             23 k
 ocaml-camomile-data                            x86_64                            0.8.5-17.fc25                                 fedora                            2.1 M
 perl-Sys-Guestfs                               x86_64                            1:1.34.3-1.fc25                               fedora                            331 k
 perl-Sys-Virt                                  x86_64                            2.1.0-1.fc25                                  fedora                            267 k
 perl-hivex                                     x86_64                            1.3.13-7.fc25                                 fedora                             55 k
 virt-top                                       x86_64                            1.0.8-18.fc24                                 fedora                            488 k

Transaction Summary
========================================================================================================================================================================
Install  10 Packages
Additional info:

The optional packages are not installed as can be easily verified with:
3. dnf install $(dnf group info virtualization | sed '1,/Optional Packages:/d')
which does show the packages require installation.

Comment 1 Jaroslav Mracek 2016-12-12 12:13:11 UTC
There is a pull-request that will fix the problem: https://github.com/rpm-software-management/dnf/pull/640

Comment 2 Jaroslav Mracek 2017-03-31 16:05:13 UTC
The patch was released in dnf-2.1.1-1 in rawhide.