[zypp-commit] r9339 - in /trunk/zypper/src: zypper-info.cc zypper-misc.cc zypper-updates.cc
![](https://seccdn.libravatar.org/avatar/b2c8050acc12d6c8fc86d8342006391c.jpg?s=120&d=mm&r=g)
Author: schubi2
Date: Wed Apr 2 13:51:58 2008
New Revision: 9339
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9339&view=rev
Log:
- Moved calls like poolItem.status().isSatisfied(),.... to poolItem.isSatisfied()
Modified:
trunk/zypper/src/zypper-info.cc
trunk/zypper/src/zypper-misc.cc
trunk/zypper/src/zypper-updates.cc
Modified: trunk/zypper/src/zypper-info.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-info.cc?rev=9339&r1=9338&r2=9339&view=diff
==============================================================================
--- trunk/zypper/src/zypper-info.cc (original)
+++ trunk/zypper/src/zypper-info.cc Wed Apr 2 13:51:58 2008
@@ -165,14 +165,8 @@
cout << _("Status: "); // TODO debug
bool i = ins_pool_item ? true : false;
- if (pool_item.status().isUndetermined ())
- cout << (i ? _("Installed"): _("Uninstalled"));
- else if (pool_item.status().isEstablishedUneeded ())
- cout << (i ? _("No Longer Applicable"): _("Not Applicable"));
- else if (pool_item.status().isEstablishedSatisfied ())
- cout << (i ? _("Applied"): _("Not Needed"));
- else if (pool_item.status().isEstablishedIncomplete ())
- cout << (i ? _("Broken"): _("Needed"));
+ if (pool_item.isBroken ())
+ cout << (i ? _("broken"): _("satisfied"));
cout << endl;
Patch::constPtr patch = asKind<Patch>(pool_item.resolvable());
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=9339&r1=9338&r2=9339&view=diff
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Wed Apr 2 13:51:58 2008
@@ -269,8 +269,8 @@
installer.installed_item.resolvable()->arch() == installer.item.resolvable()->arch() &&
( ! copts.count("force") ) )
{
- // if it is needed install anyway, even if it is installed
- if ( installer.item.status().isNeeded() )
+ // if it is broken install anyway, even if it is installed
+ if ( installer.item.isBroken() )
{
installer.item.status().setTransact( true, zypp::ResStatus::USER );
}
@@ -1024,7 +1024,7 @@
if (!full_pool_shown // show item if not shown all before
|| it->status().transacts() // or transacts
- || !it->status().isUndetermined()) // or established status
+ || !it->isBroken()) // or broken status
{
_XDEBUG( count << ": " << *it );
}
@@ -1155,7 +1155,7 @@
ResObject::constPtr res = it->resolvable();
Patch::constPtr patch = asKind<Patch>(res);
- if ( it->status().isNeeded() )
+ if ( it->isBroken() )
{
gData.patches_count++;
if (patch->category() == "security")
@@ -1177,17 +1177,7 @@
static string string_status (const ResStatus& rs)
{
- bool i = rs.isInstalled ();
- if (rs.isUndetermined ())
- return i? _("Installed"): _("Uninstalled");
- else if (rs.isEstablishedUneeded ())
- return i? _("No Longer Applicable"): _("Not Applicable");
- else if (rs.isEstablishedSatisfied ())
- return i? _("Applied"): _("Not Needed");
- else if (rs.isEstablishedIncomplete ())
- return i? _("Broken"): _("Needed");
- // if ResStatus interface changes
- return _("error");
+ return rs.isInstalled () ? _("Installed"): _("Uninstalled");
}
// patches
@@ -1207,11 +1197,6 @@
for (; it != e; ++it )
{
ResObject::constPtr res = it->resolvable();
- if ( it->status().isUndetermined() ) {
-#warning is this a library bug?
- // these are duplicates of those that are determined
- continue;
- }
Patch::constPtr patch = asKind<Patch>(res);
TableRow tr;
@@ -1219,6 +1204,8 @@
tr << res->name () << res->edition ().asString();
tr << patch->category();
tr << string_status (it->status ());
+ if (it->isBroken())
+ tr << _("Broken");
tbl << tr;
}
tbl.sort (1); // Name
@@ -1248,7 +1235,7 @@
for (; it != e; ++it )
{
ResObject::constPtr res = it->resolvable();
- if ( it->status().isNeeded() )
+ if ( it->isBroken() )
{
Patch::constPtr patch = asKind<Patch>(res);
@@ -1268,7 +1255,7 @@
patchcount++;
- if ( it->status().isNeeded())
+ if ( it->isBroken())
{
Patch::constPtr patch = asKind<Patch>(res);
if ((pkg_mgr_available && patch->affects_pkg_manager()) ||
@@ -1330,7 +1317,7 @@
for (; it != e; ++it )
{
ResObject::constPtr res = it->resolvable();
- if ( it->status().isNeeded() )
+ if ( it->isBroken() )
{
Patch::constPtr patch = asKind<Patch>(res);
@@ -1340,6 +1327,8 @@
tr << res->name () << res->edition ().asString();
tr << patch->category();
tr << string_status (it->status ());
+ if (it->isBroken())
+ tr << _("Broken");
if (patch->affects_pkg_manager ())
pm_tbl << tr;
@@ -1688,7 +1677,7 @@
{
ResObject::constPtr res = it->resolvable();
- if ( it->status().isNeeded() ) {
+ if ( it->isBroken() ) {
Patch::constPtr patch = asKind<Patch>(res);
if (attempt == 1 || patch->affects_pkg_manager ()) {
// #221476
Modified: trunk/zypper/src/zypper-updates.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-updates.cc?rev=9339&r1=9338&r2=9339&view=diff
==============================================================================
--- trunk/zypper/src/zypper-updates.cc (original)
+++ trunk/zypper/src/zypper-updates.cc Wed Apr 2 13:51:58 2008
@@ -121,8 +121,8 @@
{
Resolvable::constPtr res = it->resolvable();
Patch::constPtr patch = asKind<Patch>(res);
- MIL << patch->name() << " " << patch->edition() << " " << "[" << patch->category() << "]" << ( it->status().isNeeded() ? " [needed]" : " [unneeded]" )<< std::endl;
- if ( it->status().isNeeded() )
+ MIL << patch->name() << " " << patch->edition() << " " << "[" << patch->category() << "]" << ( it->isBroken() ? " [broken]" : " [satisfied]" )<< std::endl;
+ if ( it->isBroken() )
{
out << "
participants (1)
-
schubi2@svn.opensuse.org