[zypp-devel] Auto selectables
Hi, Any direct way to know the packages that the resolver has modified? Iterating the pool looking for packages with the Auto status should be good enough for what I want, but just wondering there. Thanks, Ricardo -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Ricardo Cruz schrieb:
Hi,
Any direct way to know the packages that the resolver has modified?
Iterating the pool looking for packages with the Auto status should be good enough for what I want, but just wondering there.
Thanks, Ricardo
Each item (e.g. package) has a status which is described here: http://en.opensuse.org/Libzypp/Solver#Solutions You can ask an item if it will be transacted (delete/install) by the solver: File ResStatus.h bool isBySolver() const BUT this status reflects the current solver run only. We do not store this information permanently for future use. Greetings Stefan -- ******************************************************************************* Stefan Schubert SUSE LINUX GmbH - Maxfeldstrasse 5 - D-90409 Nuernberg, Germany e-mail: schubi@suse.de ------------------------------------------------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Qui, 2007-11-29 às 09:19 +0100, Stefan Schubert escreveu:
Ricardo Cruz schrieb: Each item (e.g. package) has a status which is described here: http://en.opensuse.org/Libzypp/Solver#Solutions You can ask an item if it will be transacted (delete/install) by the solver:
File ResStatus.h bool isBySolver() const
BUT this status reflects the current solver run only. We do not store this information permanently for future use.
What do you mean by the current solver? I'm just doing: zypp::getZYpp()->resolver()->resolvePools(); How do I know the selectables that were touched by that? isBySolver() seems to be returning true for every selectable. Thanks, Ricardo -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dne Thursday 29 November 2007 02:45:05 Ricardo Cruz napsal(a):
Hi,
Any direct way to know the packages that the resolver has modified?
Iterating the pool looking for packages with the Auto status should be good enough for what I want, but just wondering there.
I use this code in ncurses PM: ZyppPoolIterator b = zyppPkgBegin(), e = zyppPkgEnd(), it; for (it = b; it != e; ++it) { zypp::ui::Selectable::Ptr slb = *it; // show all packages which are automatically selected for installation if ( slb->toModify() && slb->modifiedBy () != zypp::ResStatus::USER ) .... } implicitely assuming that if the packages were not modified by user, it must have been solver who changed their status... But don't know if it's correct and optimal solution, after all, I'm not a zypp developer B. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter
Hi Katarina, Thanks. I wasn't thinking straight there though. What I need is all packages modified by the last resolver operation. If the user reverts a package install that had pushed a package dependency with it, I want to know that the dependency has changed its status back, unmodified. I will just save the packages statuses and test them after a resolver. Cheers, Ricardo -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (3)
-
Katarina Machalkova
-
Ricardo Cruz
-
Stefan Schubert