Mailinglist Archive: zypp-devel (227 mails)

< Previous Next >
Re: [zypp-devel] new PoolItem/ResObject call isRelevant()
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 22 Apr 2008 12:05:18 +0200
  • Message-id: <20080422100517.GA19608@xxxxxxx>
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.

--

cu,
Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+

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

< Previous Next >
Follow Ups