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
database.
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.
Thanks,
Ricardo
Quoting "Ricardo Cruz"
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 break 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.
Thanks, Ricardo
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org