Mailinglist Archive: zypp-devel (84 mails)

< Previous Next >
[zypp-devel] new workflow / libzypp-bindings
  • From: "Jan-Simon Möller" <dl9pf@xxxxxx>
  • Date: Fri, 8 Aug 2008 21:59:10 +0200
  • Message-id: <200808082159.11080.dl9pf@xxxxxx>
Hi!

I successfully compiled the libzypp-bindings now. As stated in a previous mail,
the examples are outdated. I'm no trying to fix it, but got stuck:
E.g.: list-available-resolvables.py bails out at Z.addResolvables(...)

I started coding a bit about my use-case: Read repo from local server, display
installable items.
Its much like the list-available-resolvables.py - just a remote-repo.

It should look like:

import zypp
Z = zypp.ZYppFactory_instance().getZYpp()

repoManager = zypp.RepoManager()

#possibly set PATH to some /tmp/foo (won't touch installed system!)

# myurl1 = zypp.Url("http://192.168.10.247/home:/user/standard/";) # right ?
repo1 = repoManager.addRepository(?????) # hmm syntax inside () ???
repo2 =
repo3 =

repos = repoManager.knownRepositories()
for repo in repos:
if not repo.enabled()
continue
if not repo.isCached(repo):
repoManager.buildCache(repo)

#
# substitute for Z.addResolvables() !!

print "Available" # ... and so on


Any help appreciated!

Best regards
Jan-Simon
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >