Bug 721134 - [RFE] Nicer return format for dependency resolution
Summary: [RFE] Nicer return format for dependency resolution
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 27
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 684061
TreeView+ depends on / blocked
 
Reported: 2011-07-13 19:50 UTC by Justin Sherrill
Modified: 2013-09-09 16:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-24 20:14:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2011-07-13 19:50:06 UTC
For katello we need a better format for dependency resolution.  Basically we need something like this:


[ foo-1.0 -> [ bar >= 1.0 -> [bar-1.0  -> [nano=1.0 -> [nano-1.0]], 
                              bar-1.2, -> [nano=1.0 -> [nano-1.0]],
                              bar-1.3  -> [nano=1.2 -> [nano-1.2]]],
               json >= 3.0 -> [ json-3.3.4 ]
             ]
]


basically we need a dependency tree with packages grouped by what dependency they satisfy.  So the above is more verbose, but something simpler that would also work would be:


[ foo-1.0 ->  [
                   [ bar-1.0  -> [nano-1.0], 
                     bar-1.2, -> [nano-1.0]
                     bar-1.3  -> [nano-1.2]
                    ],
                    [ json-3.3.4 ]
               ]
]



basically a each package pointing to a list of groups of packages, each group satisfying a dependency.  

The purpose of this is to allow us to trim branches of dependencies when we already have a package in the next environment that satisfies a particular dependency.

Comment 1 Justin Sherrill 2011-07-13 19:54:27 UTC
Also to note you would have to handle circular dependencies.  So within a branch of the tree, if a package already exists but is required again, it could be ignored (within that branch).


for example:


foo-1.0 -> bar-1.0 -> nano-1.0 -> bar-1.0

we don't need to list bar-1.0 twice, since it is already in the branch, even if nano requires it.

Comment 2 Justin Sherrill 2011-07-13 19:58:34 UTC
Another note to make.  If the amount of data is too large due to package duplication, it would be fine for the return format to return a huge list of all the package objects, as well as the above tree and only include the id or nvrea as the pkg node.  

Something like (as the full format):

{
   dep_tree: [...full dep tree with only pkg ids...],
   missing_deps: [list of missing.],
   all_pkgs:  [ list of package objects ]
}


This would ensure that the full package object for each package is only included once.  If we include the full object in the dep tree it may appear many times (especially for something like glibc).

Just a though :)

Comment 3 Jeff Ortel 2011-08-12 21:48:32 UTC
build: 0.224

Comment 4 Preethi Thomas 2011-09-27 19:15:32 UTC
verified
[root@preethi integration]# rpm -q pulp
pulp-0.0.234-1.fc15.noarch

[root@preethi integration]# python deptest.py upload zsh
starting recursive solve Tue Sep 27 15:23:45 2011
========= Non Recursive Results ============

# of deps: 0

========= Missing Dependencies =========

{'mktemp': [], 'libdl.so.2(GLIBC_2.2.5)(64bit)': [], 'grep': [], 'libtinfo.so.5()(64bit)': [], 'libdl.so.2()(64bit)': [], 'libc.so.6(GLIBC_2.11)(64bit)': [], 'libncursesw.so.5()(64bit)': [], 'rtld(GNU_HASH)': [], 'coreutils': [], '/bin/sh': [], 'fileutils': [], 'libm.so.6(GLIBC_2.2.5)(64bit)': [], '/sbin/install-info': [], 'libm.so.6()(64bit)': []}
========= Recursive Results ============

# of deps: 0

========= Missing Dependencies =========

{'mktemp': [], 'libdl.so.2(GLIBC_2.2.5)(64bit)': [], 'grep': [], 'libtinfo.so.5()(64bit)': [], 'libdl.so.2()(64bit)': [], 'libc.so.6(GLIBC_2.11)(64bit)': [], 'libncursesw.so.5()(64bit)': [], 'rtld(GNU_HASH)': [], 'coreutils': [], '/bin/sh': [], 'fileutils': [], 'libm.so.6(GLIBC_2.2.5)(64bit)': [], '/sbin/install-info': [], 'libm.so.6()(64bit)': []}
========= Dependency Tree =========

{'zsh-4.3.10-5.fc14.x86_64': {('coreutils', None, (None, None, None)): [], ('grep', None, (None, None, None)): [], ('libdl.so.2()(64bit)', None, (None, None, None)): [], ('/sbin/install-info', None, (None, None, None)): [], ('libtinfo.so.5()(64bit)', None, (None, None, None)): [], ('mktemp', None, (None, None, None)): [], ('libc.so.6(GLIBC_2.11)(64bit)', None, (None, None, None)): [], ('libdl.so.2(GLIBC_2.2.5)(64bit)', None, (None, None, None)): [], ('libm.so.6()(64bit)', None, (None, None, None)): [], ('rtld(GNU_HASH)', None, (None, None, None)): [], ('fileutils', None, (None, None, None)): [], ('libncursesw.so.5()(64bit)', None, (None, None, None)): [], ('/bin/sh', None, (None, None, None)): [], ('libm.so.6(GLIBC_2.2.5)(64bit)', None, (None, None, None)): []}}
1
End recursive solve Tue Sep 27 15:23:45 2011

Comment 5 Preethi Thomas 2012-02-24 20:14:05 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 6 Preethi Thomas 2012-02-24 20:18:46 UTC
Pulp v1.0 is released.


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