Bug 1287594 - [RFE] Requirements for the same package with versions in between
Summary: [RFE] Requirements for the same package with versions in between
Keywords:
Status: CLOSED DUPLICATE of bug 1389871
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-02 12:03 UTC by Vít Ondruch
Modified: 2016-11-16 08:26 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-16 08:26:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1389871 0 unspecified CLOSED [RFE] version range dependency 2021-02-22 00:41:40 UTC

Internal Links: 1389871

Description Vít Ondruch 2015-12-02 12:03:32 UTC
Description of problem:
We have specified following BR in rubygem-actionmailer [1]:

BuildRequires: rubygem(minitest) >= 5.1.0
BuildRequires: rubygem(minitest) <= 5.3.1

Since there is implicit AND between lines, one would expect, that this will install package rubygem(minitest) >= 5.1.0 AND rubygem(minitest) <= 5.3.1, but surprisingly, this [2] is what DNF installs:

DEBUG util.py:393:   rubygem-minitest                    noarch  5.8.1-1.fc24          build   42 k
DEBUG util.py:393:   rubygem-minitest4                   noarch  4.7.0-5.fc23          build   43 k

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
rubygem-minitest.noarch 5.8.1-1.fc24 and rubygem-minitest4.noarch 4.7.0-5.fc23 are installed

Expected results:
The build should fail, since there is no rubygem-minitest package with version in between 5.1.0 and 5.3.1

Additional info:



[1] http://pkgs.fedoraproject.org/cgit/rubygem-actionmailer.git/tree/rubygem-actionmailer.spec#n30
[2] https://kojipkgs.fedoraproject.org//packages/rubygem-actionmailer/4.2.5/1.fc24/data/logs/noarch/root.log

Comment 1 Jan Kurik 2016-02-24 14:04:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 2 Igor Gnatenko 2016-04-25 12:22:57 UTC
RPM threats

Comment 3 Florian Festi 2016-04-25 12:27:57 UTC
Requires are matched against provides not package names (only). I assume that rubygem-minitest4-4.7.0-5.fc23 Provides: rubygem-minitest = 4.7.0-5

This means that both Requires are fulfilled with those two packages. Unfortunately there is no mean in RPM right now to link the two Requires: lines together in a way that they have to be fulfilled with one exact package.

Comment 4 Igor Gnatenko 2016-04-25 12:28:27 UTC
RPM threats those dependencies as different requirements.

I think we need to introduce syntax for:
5.1.0 <= FooBar <= 5.3.0

Comment 5 Florian Festi 2016-11-09 09:29:34 UTC
One work around is adding

BuildConflicts: rubygem(minitest) < 5.1.0

and may be even

BuildConflicts: rubygem(minitest) > 5.3.1

Note that this has not quite the same semantics as a Requirement for a version range as it actively prevents versions outside of the range being installed which in theory could create additional problems. It should just work for most cases, though.

Comment 6 Igor Gnatenko 2016-11-16 08:26:30 UTC

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


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