Mailinglist Archive: zypp-devel (102 mails)
| < Previous | Next > |
[zypp-devel] Reintroduced 'DueToObsolete' in ResStatus (but Pkg-kit needs fix)
- From: Michael Andres <ma@xxxxxxx>
- Date: Tue, 3 Mar 2009 17:11:14 +0100
- Message-id: <200903031711.15471.ma@xxxxxxx>
On Thursday 26 February 2009 11:02:50 Michael Andres wrote:
I reintroduced this 'DueToObsolete' in TRUNK. And now the bit is actually set
if the package is obsoleted.
But the above code snippet is wrong.
isToBeUninstalledDueTo* are sub cases of isToBeUninstalled. So it should look
like this:
if ( isToBeInstalled )
PK_INFO_ENUM_INSTALLING;
else if ( isToBeUninstalled )
{
if ( isToBeUninstalledDueToUpgrade )
PK_INFO_ENUM_UPDATING;
else if ( isToBeUninstalledDueToObsolete )
PK_INFO_ENUM_OBSOLETING;
else
PK_INFO_ENUM_REMOVING;
}
--
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
On Thursday 26 February 2009 00:21:38 Duncan Mac-Vicar P. wrote:
Duncan Mac-Vicar P. wrote:
7 days ago Michael Andres remove unused 'DueToObsolete' from
ResStatus
Looking at Michael's commit, would it just be ok to remove the
.isToBeUninstalledDueToObsolete () case?
if (it->status ().isToBeUninstalled ()) {
status = PK_INFO_ENUM_REMOVING;
hit = TRUE;
}else if (it->status ().isToBeInstalled ()) {
status = PK_INFO_ENUM_INSTALLING;
hit = TRUE;
}else if (it->status ().isToBeUninstalledDueToUpgrade ()) {
status = PK_INFO_ENUM_UPDATING;
hit = TRUE;
}else if (it->status ().isToBeUninstalledDueToObsolete ()) {
status = PK_INFO_ENUM_OBSOLETING;
hit = TRUE;
}
Yes, but this bit is never set. If the info is really needed we have to
provide some method that computes it? In that case we should revert the
change, untill we know how.
I reintroduced this 'DueToObsolete' in TRUNK. And now the bit is actually set
if the package is obsoleted.
But the above code snippet is wrong.
isToBeUninstalledDueTo* are sub cases of isToBeUninstalled. So it should look
like this:
if ( isToBeInstalled )
PK_INFO_ENUM_INSTALLING;
else if ( isToBeUninstalled )
{
if ( isToBeUninstalledDueToUpgrade )
PK_INFO_ENUM_UPDATING;
else if ( isToBeUninstalledDueToObsolete )
PK_INFO_ENUM_OBSOLETING;
else
PK_INFO_ENUM_REMOVING;
}
--
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 > |