Bug 1167881 - [RFE] DNF group install should automatically exclude packages that conflict and are marked as "optional" or "default" in comps
Summary: [RFE] DNF group install should automatically exclude packages that conflict a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Michal Luscon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1199653 (view as bug list)
Depends On: 1146487 1167719
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-25 14:53 UTC by Stephen Gallagher
Modified: 2015-11-04 21:10 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 21:10:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1114422 0 high CLOSED [rfe] Provide hooks functionality 2021-02-22 00:41:40 UTC

Internal Links: 1114422

Description Stephen Gallagher 2014-11-25 14:53:46 UTC
Description of problem:
Fedora 21 now provides four different "variants": Server, Workstation, Cloud and "nonproduct". These are each handled by a subpackage of fedora-release that contains a virtual 'Provides: fedora-release-product'.

The installation environment groups for each of the Server, Workstation and Cloud installers will include the associated fedora-release-* package as a mandatory install. However, this causes issues post-install when attempting to install another environment group (for example, the 'Development and Creative Workstation') will fail because that environment group is designed to pull in fedora-release-nonproduct, which will conflict.

I'm updating comps.xml to change the environments to have "fedora-release-[$PRODUCT|nonproduct]" listed as a default (not mandatory) component. I would like to see DNF updated in such a way that if a group or envgroup installation has a package conflict on a package that is listed as either "default" or "optional" in comps.xml, then DNF will attempt to re-run the transaction again, this time with an exclusion on the conflicting package.


Version-Release number of selected component (if applicable):
dnf-0.6.2-1.fc21

How reproducible:
Every time

Steps to Reproduce:
1. Install Fedora Server or Fedora Workstation
2. Attempt to run 'dnf groupinstall "Development and Creative Workstation"'

Actual results:
The transaction fails with a conflict between fedora-release-workstation and fedora-release-nonproduct.


Expected results:
The fedora-release-nonproduct should not be installed if fedora-release-workstation already exists.

Additional info:

Comment 1 Stephen Gallagher 2014-11-25 15:42:10 UTC
After conversation in IRC, I realize I need to clarify the "Expected results" as it was apparently ambiguous.

The precondition is this: a user has installed a system using Fedora Workstation. This means that they already have installed the environment group "Fedora Workstation", which includes a mandatory package named "fedora-release-workstation".

The user has decided that they also want the packages from the "Development and Creative Workstation" environment group. This group contains the package "fedora-release-nonproduct" which conflicts with "fedora-release-workstation". 

The "Development and Creative Workstation" environment group lists "fedora-release-nonproduct" as "<packagereq type=default>".

The expected outcome here is that all of the packages from the "Development and Creative Workstation" environment group should be installed *except* for "fedora-release-nonproduct" due to its conflict with "fedora-release-workstation".

Comment 2 Radek Holy 2014-11-26 08:55:36 UTC
One problem I can see is that it would require one or more additional dependency resolving resulting in more complex code base just to work around the real cause.

Comment 3 Honza Silhan 2014-12-01 14:10:31 UTC
As Radek said automatic excluding of packages would led to wrong design and harder maintainability of DNF. OTOH some other bugs (bug 1114422) request running solver twice.

Michael, does libsolv have some SOLVABLE_* flag that will try to install package if possible otherwise it will just skip it and continue? Something like forcebest for solvables so mandatory packages gets always installed.

Comment 4 Michael Schröder 2014-12-03 16:53:59 UTC
You can use SOLVER_WEAK in the job. This tells libsolv that it can silently ignore the job if it is impossible to fulfill.

Comment 5 Honza Silhan 2014-12-05 18:10:21 UTC
Thanks for response, Michael. So we can solve this bug pretty easy. We should add "optional=False" argument to hawkey.Goal.install method and inside do whats in comment 4.

Comment 6 Radek Holy 2015-03-09 12:46:57 UTC
*** Bug 1199653 has been marked as a duplicate of this bug. ***

Comment 7 Michal Luscon 2015-03-09 16:47:15 UTC
Implemented in https://github.com/rpm-software-management/dnf/pull/228

Comment 8 Fedora End Of Life 2015-11-04 15:50:11 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Adam Williamson 2015-11-04 21:10:49 UTC
Per #c7 this ought to be fixed in current releases.


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