Bug 452277 - matchingPrcos call fails to identify installed dependencies
Summary: matchingPrcos call fails to identify installed dependencies
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 10
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-20 17:30 UTC by Darrell R. Kresge
Modified: 2014-01-21 23:03 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-21 18:09:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Darrell R. Kresge 2008-06-20 17:30:44 UTC
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 19:26:14 UTC
 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-19 02:11:15 UTC
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-26 02:26:57 UTC
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.