Bug 1329805 - Incorrect handling of "Recommends:" weak dependency
Summary: Incorrect handling of "Recommends:" weak dependency
Keywords:
Status: CLOSED DUPLICATE of bug 1304355
Alias: None
Product: Fedora
Classification: Fedora
Component: mash
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-23 11:20 UTC by Christian Stadelmann
Modified: 2016-08-07 14:50 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-28 13:32:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christian Stadelmann 2016-04-23 11:20:10 UTC
Description of problem:
In at least one case (fedora-easy-karma), a weak dependency isn't installed though it should be.

Version-Release number of selected component (if applicable):
dnf-1.1.8-1.fc24.noarch
libsolv-0.6.20-1.fc24.x86_64
hawkey-0.6.2-4.fc24.x86_64

How reproducible:
on Fedora 23 iso build 10 (live system)
on Fedora 24 Alpha iso build 7 (live system)
on a fully updated F24 Alpha (package versions above)

Steps to Reproduce:
1. `dnf install fedora-easy-karma`
2. check whether `python2-dnf` is installed

Actual results:
`python2-dnf` should be installed

Expected results:
it is not installed

Additional info:
Packaging guidelines for weak dependencies [1] state:

| Weak dependencies are by default treated similarly to regular Requires:. Matching packages are added to the dnf transaction. If adding the package would lead to an error dnf will by default ignore the dependency.

Installing `python2-dnf` by running `dnf install python2-dnf` works fine, so the latter sentence doesn't apply.

I know that the `Requires:` tag is wrong with f-e-k, but that's a different bug: #1329629

[1] https://fedoraproject.org/wiki/Packaging:WeakDependencies

Comment 1 Michal Luscon 2016-04-25 11:12:37 UTC
Do you use easy-karma of equal or higher version than 0.28.20150921gitc932687a.fc24?

Comment 2 Christian Stadelmann 2016-04-25 16:12:28 UTC
(In reply to Michal Luscon from comment #1)
> Do you use easy-karma of equal or higher version than
> 0.28.20150921gitc932687a.fc24?

Equal: fedora-easy-karma-0-0.28.20150921gitc932687a.fc24.noarch

Comment 3 Igor Gnatenko 2016-05-02 11:26:56 UTC
Please run:
$ sudo dnf repoquery --recommends fedora-easy-karma

And show output. This looks very weird.

Comment 4 Christian Stadelmann 2016-05-02 14:51:39 UTC
(In reply to Igor Gnatenko from comment #3)
> Please run:
> $ sudo dnf repoquery --recommends fedora-easy-karma

$ dnf repoquery --recommends fedora-easy-karma
python2-dnf

Which is exactly what is specified in https://pkgs.fedoraproject.org/cgit/rpms/fedora-easy-karma.git/tree/fedora-easy-karma.spec?h=f24#n26

Comment 5 Igor Gnatenko 2016-05-02 17:25:27 UTC
(In reply to Christian Stadelmann from comment #4)
> (In reply to Igor Gnatenko from comment #3)
> > Please run:
> > $ sudo dnf repoquery --recommends fedora-easy-karma
> 
> $ dnf repoquery --recommends fedora-easy-karma
> python2-dnf
> 
> Which is exactly what is specified in
> https://pkgs.fedoraproject.org/cgit/rpms/fedora-easy-karma.git/tree/fedora-
> easy-karma.spec?h=f24#n26

hm, I can't reproduce.... Can you try it again? I mean remove python2-dnf, fedora-easy-karma and try to install f-e-k again.

Comment 6 Christian Stadelmann 2016-05-02 18:56:45 UTC
(In reply to Igor Gnatenko from comment #5)
> hm, I can't reproduce.... Can you try it again? I mean remove python2-dnf,
> fedora-easy-karma and try to install f-e-k again.

That's the current status on my system. python2-dnf is not installed, but fedora-easy-karma is. After `dnf remove fedora-easy-karma` and `dnf install fedora-easy-karma`, python2-dnf still is not installed.

As written above (see comment #0) this even applies to a Fedora 24 Alpha Build 7 live session, so this is not due to any weird (mis-)configuration and should easily be reproducible for you.

Comment 7 Igor Gnatenko 2016-05-09 11:18:09 UTC
There is no Recommends in repodata XML... RPM 4.12+ supports weak dependencies.


<package type="rpm">
  <name>fedora-easy-karma</name>
  <arch>noarch</arch>
  <version epoch="0" ver="0" rel="0.28.20150921gitc932687a.fc24"/>
  <checksum type="sha256" pkgid="YES">125e20964ec24e3d4382abdcd9ff45d8878e2b398e5809b15b92247a9a5f5b7e</checksum>
  <summary>Fedora update feedback made easy</summary>
  <description>Fedora-easy-karma helps you to easily and fast provide feedback for all testing
updates that you have currently installed.</description>
  <packager>Fedora Project</packager>
  <url>https://fedoraproject.org/wiki/Fedora_Easy_Karma</url>
  <time file="1458922066" build="1458839248"/>
  <size package="35478" installed="86319" archive="87068"/>
<location href="f/fedora-easy-karma-0-0.28.20150921gitc932687a.fc24.noarch.rpm"/>
  <format>
    <rpm:license>GPLv2+</rpm:license>
    <rpm:vendor>Fedora Project</rpm:vendor>
    <rpm:group>Development/Tools</rpm:group>
    <rpm:buildhost>buildvm-20-nfs.phx2.fedoraproject.org</rpm:buildhost>
    <rpm:sourcerpm>fedora-easy-karma-0-0.28.20150921gitc932687a.fc24.src.rpm</rpm:sourcerpm>
    <rpm:header-range start="5496" end="11786"/>
    <rpm:provides>
      <rpm:entry name="fedora-easy-karma" flags="EQ" epoch="0" ver="0" rel="0.28.20150921gitc932687a.fc24"/>
    </rpm:provides>
    <rpm:requires>
      <rpm:entry name="/usr/bin/python"/>
      <rpm:entry name="fedora-cert"/>
      <rpm:entry name="python-fedora"/>
    </rpm:requires>
  <file>/usr/bin/fedora-easy-karma</file>
  </format>
</package>

Comment 8 Igor Gnatenko 2016-06-28 13:32:43 UTC

*** This bug has been marked as a duplicate of bug 1304355 ***


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