https://bugzilla.novell.com/show_bug.cgi?id=409150
User kmachalkova@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=409150#c1
--- Comment #1 from Katarina Machalkova 2008-07-15 03:04:19 MDT ---
This is how predicate for needed patch looks like:
if ( selectable->hasCandidateObj() &&
selectable->candidateObj().isRelevant() )
{
if ( ! selectable->candidateObj().isSatisfied() ||
selectable->candidateObj().status().isToBeInstalled() )
displayPatch = true;
}
This is a predicate for unneeded patch:
if ( selectable->hasCandidateObj() &&
( !selectable->candidateObj().isRelevant() ||
( selectable->candidateObj().isSatisfied() &&
! selectable->candidateObj().status().isToBeInstalled() ) ) )
{
displayPatch = true;
}
You see, this is very complicated and error-prone. Moreover, if something
changes in this area in libzypp, the conditions and their evaluation must be
fixed on 2 (or 3) different places in 2-3 different patch selectors - qt-pkg,
ncurses-pkg, and possibly gtk.
It would be nice if the above part of code moved to libzypp and was accesible
from package selectors (e.g. as bool ZyppSelectable->isNeeded(), isNotNeeded()
functions), so next time a bug is fixed or a code adjustment is done on a
single place.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.