Mailinglist Archive: zypp-devel (26 mails)

< Previous Next >
Re: [zypp-devel] List unnecessary dependencies
  • From: "Ricardo Cruz" <rpmcruz@xxxxxxxxxxxxxxxxxxx>
  • Date: Wed, 08 Sep 2010 16:01:36 +0200
  • Message-id: <20100908160136.1546492ksav2cyg4@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi there,

I was coding a python test case for this, but I can't
seem to be able to initialize zypp with the local RPM

import zypp
_zypp = zypp.ZYppFactory_instance().getZYpp()
_target = _zypp.initializeTarget(zypp.Pathname(" ? "))
_pool = _zypp.pool()
print "pool size:", _pool.size() # zero :-(

What string should I pass to _zypp.initializeTarget() ?

I have tried to dig up yast2 code on this, but couldn't
pin down where initialization of the local database gets
done, and other sources weren't more successful.


Quoting "Ricardo Cruz" <rpmcruz@xxxxxxxxxxxxxxxxxxx>:

Hi there,

So, another approach would be to manually do something like:

l = []
for p in pool:
if p.installedBySolver():
needed = False
for q in pool:
if q.requires (p):
needed = True
if not needed:
l.append (p)

Is there some p.installedBySolver() method though?

If not, is there a cheaper way to implement then, than digging
up the respective log in parser::HistoryLogReader.


This message was sent using IMP, the Internet Messaging Program.

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

< Previous Next >
List Navigation
Follow Ups