Bug 142767 - up2date.solveDependencies needs to include the arch of the packages that solve the dep
Summary: up2date.solveDependencies needs to include the arch of the packages that solv...
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend   
(Show other bugs)
Version: rhn370
Hardware: All Linux
Target Milestone: ---
Assignee: John Wregglesworth
QA Contact: Beth Nackashi
Depends On:
Blocks: 147875 149472 156320 156322 159859
TreeView+ depends on / blocked
Reported: 2004-12-13 22:37 UTC by Adrian Likins
Modified: 2007-04-18 17:17 UTC (History)
1 user (show)

Fixed In Version: RHBA-2005-711
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-05 17:12:20 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example script (1.08 KB, text/plain)
2005-02-24 17:07 UTC, John Wregglesworth
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:711 qe-ready SHIPPED_LIVE up2date bug fix update 2005-10-05 04:00:00 UTC
Red Hat Product Errata RHBA-2005:712 qe-ready SHIPPED_LIVE up2date bug fix update 2005-09-28 04:00:00 UTC

Description Adrian Likins 2004-12-13 22:37:02 UTC
Description of problem:
up2date.solveDependencies doesn't return the arch of the
package that solves a dep. On multilib machines, this
makes picking the right packages to use for a dep
a bit of a heuristic that often fails.

Comment 1 John Wregglesworth 2005-02-23 16:42:26 UTC
I added a couple of methods to server/xmlrpc/up2date.py and
server/rhnDependency.py that should take care of this.

solve_dependencies_arch should be available through xmlrpc. The only
difference between this and the regular solve_dependencies from the
caller's point of view is that arch info is included in the lists that
are associated with each filename. arch info should be the last
element of the lists.

solve_dependencies_with_limits allows the caller to get all of the
packages that solve a dependency and limit
the packages that are returned to those that match the criteria
defined by limit_operator and limit. This version
of the function also returns the architecture label of the package[s]
that get returned.

-Setting the all parameter to 1 will cause the function to return info
on all of the version of a file that solves a dependency.

-The limit_operator can be any of: '<', '<=', '==', '>=', or '>'.

-limit is a a string of the format [epoch:]name-version-release,
name-version-release[:epoch], or name-version-release.

-deps is a list of filenames that the packages that are returned must
provide. (same as solve_dependencies)

-version is the version of the client that is calling the function.
(same as solve_dependencies, I believe).

I'm working on a test plan.

Comment 2 John Wregglesworth 2005-02-23 22:54:11 UTC
Small correction for my previous comment. From xmlrpc, the function
calls are solveDependencies_arch and solveDependencies_with_limits,
not solve_dependencies_arch and solve_dependencies_with_limits. I
named them that way to be consistant with the original
solveDependencies method (which is still available).

Test Plan

This is going to require a satellite that has these changes
incorporated. I'll add a comment later when I know what build they're
in. This will probably require a script to test.

1. Using XML-RPC connect to http[s]://<hostname>/XMLRPC.
2. Call solve_dependencies_arch and solve_dependencies_with_limits
with various combinations of parameters. They are methods of the
up2date object so calls to them will look something like:

server.up2date.solveDependencies_arch(system_id, deps)
server.up2date.solveDependencies_with_limit( system_id, deps,
limit="10:name-1.0-1.0", limit_operator=">=" )

With solveDependencies_with_limit, limit and limit_operator must be
used together. The method should throw an exception if they aren't. 

If limit can't be parsed, it should throw an exception instead of
failing silently.

Comment 3 John Wregglesworth 2005-02-24 17:07:59 UTC
Created attachment 111385 [details]
Example script

I've attached a simple Python script that shows the differences between the
solveDependencies functions.

Comment 4 Todd Warner 2005-05-09 19:03:51 UTC
mass move to ON_QA after 2005-05-09 QA push

Comment 6 Debbie McGrath 2005-06-21 21:23:55 UTC
Dev & PM ACKs for U6

Comment 7 Debbie McGrath 2005-06-22 13:49:10 UTC
Devel & PM ACK for U2

Comment 10 Beth Nackashi 2005-06-29 16:03:25 UTC
bnackash -- 6/29/2005

Verified fix on a client registered to a 4.0.0-79a satellite. Note arch type is
now displayed in the list.

[root@test07 ~]# python /tmp/142767.py 
old stuff
{'libcaps.so': [['mozilla', '1.7.8', '1.4.1', '37']]}
new stuff
{'libcaps.so': [['mozilla', '1.7.8', '1.4.1', '37', 'i386']]}
other stuff
{'libcaps.so': [['mozilla', '1.7.8', '1.4.1', '37', 'i386'], ['mozilla',
'1.7.7', '1.4.2', '37', 'i386'], ['mozilla', '1.7.6', '1.4.1', '37', 'i386'],
['mozilla', '1.7.3', '19.EL4', '37', 'i386'], ['mozilla', '1.7.3', '18.EL4',
'37', 'i386']]}

Comment 11 Beth Nackashi 2005-06-29 16:06:10 UTC
bnackash -- 6/29/2005

Bug is now PROD_READY for rhel 3 u6 only.

Comment 12 Beth Nackashi 2005-06-29 16:12:36 UTC
also verified on client registered to hosted

Bug is now PROD_READY for all releases.

Comment 13 Debbie McGrath 2005-07-08 21:46:10 UTC
This bug should be on both the R3U6 and R4U2 CanFix lists.
This bug blocks bugs that are already on those lists.
And it has finished RHN QA.

Comment 15 Red Hat Bugzilla 2005-10-05 17:12:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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