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.
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.
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 :)
build: 0.224
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
Pulp v1.0 is released Closed Current Release.
Pulp v1.0 is released.