This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 452277 - matchingPrcos call fails to identify installed dependencies
matchingPrcos call fails to identify installed dependencies
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
10
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-20 13:30 EDT by Darrell R. Kresge
Modified: 2014-01-21 18:03 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-21 13:09:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Darrell R. Kresge 2008-06-20 13:30:44 EDT
Description of problem:

Given installed 'package-1.0.0' requiring '1.0.0 <= dependency < 2.0.0' (also
installed)

Attempting to install 'dependency-2.0.0' will not detect that the the installed
package 'package' requires disposition

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

3.2.7 - 3.2.16

How reproducible:

Consistently with new install and no plugins

Steps to Reproduce:

Given installed 'package-1.0.0' requiring 'dependency >= 1.0.0' and 'dependency < 2.0.0' (also 
installed)

Attempting to install 'dependency-2.0.0' will not detect that the the installed package 'package' 
requires disposition.

[root@aa0-001-3-v1 ~]# rpm -qR package
dependency >= 1.0.0
dependency < 2.0.0
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1

[root@aa0-001-3-v1 ~]# rpm -q dependency
dependency-1.0.0-0

[root@aa0-001-3-v1 ~]# yum install -d0 dependency-2.0.0-0.noarch-linux.rpm -y
ERROR with rpm_check_debug vs depsolve:
dependency is needed by (installed) package
dependency is needed by (installed) package


Actual results:

Yum fails to notice that replacing dependency will require removing or updating the installed dependent "package"


Expected results:

Either remove or attempt to find an update for dependents

Additional info:

depsolve.py::_checkRemove() -> transactioninfo.py::getRequires(*prov) to find list of packages 
requiring *prov
                            -> transactioninfo.py::getOldRequires(*prov) 
                            -> rpmsack.py::getRequires(*prov)
                            -> packages.py::matchingPrcos('requires', *prov) for po in requiring packages
                            -> rpmUtils::miscUtils::rangeCompare(*prov, tup) for tup in requirements(self)

Since rangeCompare expects arguments of (reqtup, provtup), and is logically implemented in terms of 
these concepts, the above 
usage is conceptually reversed and invalid.

Index: packages.py
===============================================================
====
--- packages.py (revision 45261)
+++ packages.py (working copy)
@@ -323,8 +323,13 @@
                     r = self.rel
                 #(e, v, r) = (self.epoch, self.ver, self.rel)
 
-            matched = rpmUtils.miscutils.rangeCompare(
-                reqtuple, (n, f, (e, v, r)))
+            if prcotype == 'requires':
+                matched = rpmUtils.miscutils.rangeCompare(
+                    (n, f, (e, v, r)), reqtuple)
+            else:
+                matched = rpmUtils.miscutils.rangeCompare(
+                    reqtuple, (n, f, (e, v, r)))
+
             if matched:
                 result.append((n, f, (e, v, r)))
Comment 1 James Antill 2008-08-07 15:26:14 EDT
 Can you try the 3.2.18 in updates-testing, I think we fixed the real cause of this bug.
Comment 2 John Poelstra 2008-10-18 22:11:15 EDT
Reporter, could you please reply to the previous question? If you won't reply in one month, I will have to close this bug as INSUFFICIENT_DATA. Thank you.
Comment 3 Bug Zapper 2008-11-25 21:26:57 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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