Bug 1184

Summary: rpm behavour wrt versions of required resources is inconsistent
Product: [Retired] Red Hat Linux Reporter: Aleksey Nogin <aleksey>
Component: rpmAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-02-19 17:46:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksey Nogin 1999-02-15 23:47:09 UTC
[nogin@gulag /tmp]# rpm -Uvh test2-2.0.1-2.i386.rpm
failed dependencies:
      test >= 2.0 is needed by test2-2.0.1-2
[nogin@gulag /tmp]# rpm -Uvh test1-2.0.1-1.i386.rpm
test2-2.0.1-2.i386.rpm
test1
##################################################
test2
##################################################
[nogin@gulag /tmp]# rpm -V test2
Unsatisfied dependencies for test2-2.0.1-2: test >= 2.0
[nogin@gulag /tmp]# rpm -e test2
[nogin@gulag /tmp]# rpm -Uvh test2-2.0.1-2.i386.rpm
failed dependencies:
      test >= 2.0 is needed by test2-2.0.1-2
[nogin@gulag /tmp]# rpm -q --provides test1
test

Here, test2 requires test >= 2.0 and nothing provides it,
but rpm did install test2 without any warning when in was
being installed together with test1 which provides "test"
resource (without the version number).

Also, it does not seem to be possible to set the version of
the provided resource in the SPEC file

Comment 1 Jeff Johnson 1999-02-16 22:59:59 UTC
Virtual packages specified in Provides/Obsoletes/Requires tags
do not support versions (even though Requires permits specification
of a version for a virtual package). Create an actual package if
you wish versions, or test only for existence of virtual packages.

Comment 2 Aleksey Nogin 1999-02-19 03:58:59 UTC
Well, I can not create a package with the right name because it is
aginst RHCN rules. My problem was that I wanted to add "Provides:
squid" to my squid-rhcn package and I realized that it may cause some
strange problems if some package requires some particular version of
squid.

Comment 3 Jeff Johnson 1999-02-19 17:46:59 UTC
I just looked at (your?) squid-rhcn-2.2.DEVEL3-1 spec file.
I would say that if you are going to do
	Obsoletes: ... squid ...
then you need to do
	Provides: squid
Yes, there is a chance that some package needs some specific
version of squid that is incompatible with your version -- that's
life. Anyways, that what I meant by "test only for existence" ...