Bug 1673851 - Problem with installing conditional group package when modules exist
Summary: Problem with installing conditional group package when modules exist
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-08 09:59 UTC by Marek Blaha
Modified: 2019-04-05 12:29 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-05 12:29:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Blaha 2019-02-08 09:59:37 UTC
Description of problem:

After switching on the --best option by default, I'm not able to install conditional package from group in case that the same package exists in higher version in a module. Module is not enabled and doesn't have any default stream.
On top of this, when the group package is not conditional but default or mandatory, group gets installed without any problem, the right ursine package is selected.

Setup:

there exists wget-0:1.19.5-5.fc29.x86_64 in enabled ursine repo

in modular repo:
comps:
  <group>
   <id>dnf-ci-testgroup</id>
   <default>false</default>
   <uservisible>true</uservisible>
   <display_order>1024</display_order>
   <name>DNF-CI-Testgroup</name>
   <description>Testgroup for DNF CI testing</description>
    <packagelist>
      <packagereq type="conditional" requires="filesystem-content">wget</packagereq>
    </packagelist>
  </group>

modules.yaml goes like this, no defaults are defined:
---       
  data:  
    description: Testing module without defaults defined
    name: DnfCiModuleNoDefaults
    stream: development
    summary: Testing module without defaults
    version: 1 
    artifacts:
      rpms:
      - wget-0:1.20.5-5.module.x86_64
  document: modulemd
  version: 2
...


# dnf install filesystem-content
# dnf group install DNF-CI-Testgroup
Error: 
 Problem: problem with installed package filesystem-content-3.9-2.fc29.x86_64
  - cannot install the best candidate for the job
  - package wget-1.20.5-5.module.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

# dnf repoquery wget
Last metadata expiration check: 0:00:47 ago on Pá 8. února 2019, 10:45:20 CET.
wget-0:1.19.5-5.fc29.src
wget-0:1.19.5-5.fc29.x86_64
wget-0:1.20.5-5.module.src



Version-Release number of selected component (if applicable):
dnf stack from nightly copr repo:
$ rpm -q dnf libdnf 
dnf-4.1.0-0.24g2594b59f.fc29.noarch
libdnf-0.26.0-0.27g9352e595.fc29.x86_64


How reproducible:
deterministic

Steps to Reproduce:
1. checkout "turbo" branch from ci-dnf-stack repo
2. cd dnf-behave-tests
3. ./run-tests -i group.feature -n 'Install condidional package if required package has been installed'

Actual results:
Error: 
 Problem: problem with installed package filesystem-content-3.9-2.fc29.x86_64
  - cannot install the best candidate for the job
  - package wget-1.20.5-5.module.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Expected results:

Group gets installed without any error.

Comment 1 Jaroslav Mracek 2019-02-23 20:38:31 UTC
I create a pull request https://github.com/openSUSE/libsolv/pull/301 that change a logic for identification of a best candidate.

Comment 2 Jaroslav Mracek 2019-02-26 21:57:32 UTC
The patch was rejected by upstream

Comment 3 Jaroslav Mracek 2019-04-05 12:29:55 UTC
It looks like that Fedora libsolv downstream do not care about resolving the issue. The solution was rejected by downstream https://src.fedoraproject.org/rpms/libsolv/pull-request/6. Sorry I did my best.


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