Mailinglist Archive: zypp-devel (227 mails)

< Previous Next >
Re: [zypp-devel] new PoolItem/ResObject call isRelevant()
  • From: Jan Kupec <jkupec@xxxxxxx>
  • Date: Mon, 28 Apr 2008 15:53:56 +0200
  • Message-id: <4815D6F4.6090707@xxxxxxx>
Michael Andres wrote:
On Mon, Apr 21, Duncan Mac-Vicar Prett wrote:

Jan Kupec wrote:
Hi,

I'm just fixing some zypper queries and started to use the following
function to print the patch status. Is it right?

string string_ppp_status(const PoolItem & pi)
{
if (pi.isRelevant())
{
if (pi.isSatisfied())
return _("Installed");

Should we call it 'installed'?
It is not installed and you can't delete it.
Call it 'applied'?


if (pi.isBroken())
return _("Needed");
// can this ever happen?
return "";
}

return _("Not Applicable");
}


Q: what should isRelevant() return for patterns/products?

jano

I think isBroken has no meaning now, as the patch is never installed, and

I think you think wrong.

There are 4 mutual exclusive states:

isUndetermined: No validation is performed (for packages).

! isRelevant: Not a single package mentioned by this item is
installed.

isSatisfied: A relevant items requirements are met.

isBroken: A relevant items requirements are broken.

Makes sense. One more question: how does this apply to Patterns and
Products? I guess isRelevant is not relevant here :O) So is isBroken.
The only that we care for the product or patterns is isSatisified()?

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

< Previous Next >
Follow Ups