diff options
author | Michael Andres <ma@suse.de> | 2008-08-04 10:29:33 +0000 |
---|---|---|
committer | Michael Andres <ma@suse.de> | 2008-08-04 10:29:33 +0000 |
commit | 05fe38f57a532ee59ec7dbf80615a41dd7ce760c (patch) | |
tree | 57678c98454d173c0c624faec3897df9bb903193 /examples | |
parent | b11fae8b2ccfe85f0005f6a4e43d33e42461f0bd (diff) | |
download | libzypp-bindings-05fe38f57a532ee59ec7dbf80615a41dd7ce760c.tar.gz libzypp-bindings-05fe38f57a532ee59ec7dbf80615a41dd7ce760c.tar.bz2 libzypp-bindings-05fe38f57a532ee59ec7dbf80615a41dd7ce760c.zip |
Geneerate bindings for RepoInfoBase and ServiceInfo
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/python/list_resolvables.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/python/list_resolvables.py b/examples/python/list_resolvables.py index 15a8170..69c3b7e 100755 --- a/examples/python/list_resolvables.py +++ b/examples/python/list_resolvables.py @@ -4,7 +4,7 @@ import zypp Z = zypp.ZYppFactory_instance().getZYpp() Z.initializeTarget( zypp.Pathname("/") ) -Z.addResolvables( Z.target().resolvables(), True ); +Z.target().load(); repoManager = zypp.RepoManager() repos = repoManager.knownRepositories() @@ -14,8 +14,7 @@ for repo in repos: continue if not repoManager.isCached( repo ): repoManager.buildCache( repo ) - - Z.addResolvables( repoManager.createFromCache( repo ).resolvables() ) + repoManager.loadFromCache( repo ); print "Items: %d" % ( Z.pool().size() ) @@ -25,9 +24,9 @@ for item in Z.pool(): t = "i" else: t = "*" - print "%s %s:%s-%s.%s\t(%s)" % ( t, - item.resolvable().kind(), - item.resolvable().name(), - item.resolvable().edition(), - item.resolvable().arch(), - item.resolvable().repository().info().alias() ) + print "%s %s" % ( t , item.resolvable()) + #print "%s %s:%s-%s.%s\t(%s)" % ( t, + # item.resolvable().kind(), + ## item.resolvable().edition(), + # item.resolvable().arch(), + # item.resolvable().repository().info().alias() ) |