Bug 142767 - up2date.solveDependencies needs to include the arch of the packages that solve the dep
up2date.solveDependencies needs to include the arch of the packages that solv...
Status: CLOSED ERRATA
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend (Show other bugs)
rhn370
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Wregglesworth
Beth Nackashi
:
Depends On:
Blocks: 147875 149472 156320 156322 159859
  Show dependency treegraph
 
Reported: 2004-12-13 17:37 EST by Adrian Likins
Modified: 2007-04-18 13:17 EDT (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2005-711
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-05 13:12:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 12:07 EST, John Wregglesworth
no flags Details

  None (edit)
Description Adrian Likins 2004-12-13 17:37:02 EST
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 11:42:26 EST
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 17:54:11 EST
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=">=" )

Notes: 
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 12:07:59 EST
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 15:03:51 EDT
mass move to ON_QA after 2005-05-09 QA push
Comment 6 Debbie McGrath 2005-06-21 17:23:55 EDT
Dev & PM ACKs for U6
Comment 7 Debbie McGrath 2005-06-22 09:49:10 EDT
Devel & PM ACK for U2
Comment 10 Beth Nackashi 2005-06-29 12:03:25 EDT
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 12:06:10 EDT
bnackash -- 6/29/2005

Bug is now PROD_READY for rhel 3 u6 only.
Comment 12 Beth Nackashi 2005-06-29 12:12:36 EDT
also verified on client registered to hosted

Bug is now PROD_READY for all releases.
Comment 13 Debbie McGrath 2005-07-08 17:46:10 EDT
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 13:12:21 EDT
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.

http://rhn.redhat.com/errata/RHBA-2005-711.html

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