* Katarina Machalkova <kmachalkova@suse.cz> [Mar 19. 2008 14:28]:
In a loop over all packages in current list, it's done like this:
if ( slbPtr->status() == S_KeepInstalled && slbPtr->hasCandidateObj() ) { if ( slbPtr->installedObj()->edition() < slbPtr->candidateObj()->edition() ) ok = statusStrategy->keyToStatus( '>', slbPtr, objPtr, newStatus ); }
Be aware that 'newer edition available' is *not* the correct criterium for update in the future. The selection of packagages eligible for update is a (sat-)solver function, taking solver policies and conflict resolution into account.
It's not probably done in a best possible way ;-) (zypp guys could maybe provide us with better algorithm), but it works.
Zypp guys will (have to) provide an API for this. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org