Author: jkupec
Date: Sun Apr 27 22:29:28 2008
New Revision: 9852
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9852&view=rev
Log:
- cleanup
Modified:
trunk/zypper/src/zypper-misc.cc
Modified: trunk/zypper/src/zypper-misc.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-misc.cc?rev=9852&r1=9851&r2=9852&view=diff
==============================================================================
--- trunk/zypper/src/zypper-misc.cc (original)
+++ trunk/zypper/src/zypper-misc.cc Sun Apr 27 22:29:28 2008
@@ -1145,11 +1145,11 @@
Patch::constPtr patch = asKind<Patch>(it->resolvable());
// set return value to 'reboot needed'
- if (patch->reboot_needed())
+ if (patch->rebootSuggested())
zypper.setExitCode(ZYPPER_EXIT_INF_REBOOT_NEEDED);
// set return value to 'restart needed' (restart of package manager)
// however, 'reboot needed' takes precedence
- else if (zypper.exitCode() != ZYPPER_EXIT_INF_REBOOT_NEEDED && patch->affects_pkg_manager())
+ else if (zypper.exitCode() != ZYPPER_EXIT_INF_REBOOT_NEEDED && patch->restartSuggested())
zypper.setExitCode(ZYPPER_EXIT_INF_RESTART_NEEDED);
}
@@ -1538,7 +1538,7 @@
bool xml_list_patches ()
{
- // returns true if affects_pkg_manager patches are availble
+ // returns true if restartSuggested() patches are availble
bool pkg_mgr_available = false;
@@ -1556,7 +1556,7 @@
{
Patch::constPtr patch = asKind<Patch>(res);
- if (patch->affects_pkg_manager())
+ if (patch->restartSuggested())
pkg_mgr_available = true;
}
}
@@ -1575,15 +1575,15 @@
if ( it->isBroken())
{
Patch::constPtr patch = asKind<Patch>(res);
- if ((pkg_mgr_available && patch->affects_pkg_manager()) ||
+ if ((pkg_mgr_available && patch->restartSuggested()) ||
!pkg_mgr_available )
{
cout << " name () << "\" ";
cout << "edition=\"" << res->edition ().asString() << "\" ";
cout << "category=\"" << patch->category() << "\" ";
- cout << "pkgmanager=\"" << (patch->affects_pkg_manager() ? "true" : "false") << "\" ";
- cout << "restart=\"" << (patch->reboot_needed() ? "true" : "false") << "\" ";
+ cout << "pkgmanager=\"" << (patch->restartSuggested() ? "true" : "false") << "\" ";
+ cout << "restart=\"" << (patch->rebootSuggested() ? "true" : "false") << "\" ";
cout << "interactive=\"" << (patch->interactive() ? "true" : "false") << "\" ";
cout << "kind=\"patch\"";
cout << ">" << endl;
@@ -1614,10 +1614,10 @@
// ----------------------------------------------------------------------------
-static void list_patch_updates(Zypper & zypper, bool best_effort)
+static void list_patch_updates(Zypper & zypper)
{
Table tbl;
- Table pm_tbl; // only those that affect packagemanager: they have priority
+ Table pm_tbl; // only those that affect packagemanager (restartSuggested()), they have priority
TableHeader th;
unsigned cols;
@@ -1646,7 +1646,7 @@
tr << patch->category();
tr << _("Needed");
- if (patch->affects_pkg_manager ())
+ if (patch->restartSuggested ())
pm_tbl << tr;
else
tbl << tr;
@@ -1803,7 +1803,7 @@
{
zypper.out().info(i18n_kind_updates(*it), Out::QUIET, Out::TYPE_NORMAL);
zypper.out().info("", Out::QUIET, Out::TYPE_NORMAL); // visual separator
- list_patch_updates(zypper, best_effort );
+ list_patch_updates(zypper);
}
localkinds.erase(it);
}
@@ -1904,7 +1904,7 @@
// use LookForArchUpdate as callback handler in order to cope with
// multiple installed resolvables of the same name.
// LookForArchUpdate will return the one with the highest edition.
-
+/*
static PoolItem
findInstalledItem( PoolItem item )
{
@@ -1919,13 +1919,14 @@
_XDEBUG("findInstalledItem(" << item << ") => " << info.best);
return info.best;
}
-
+*/
// require update of installed item
// The PoolItem passed to require_item_update() is the installed resolvable
// to which an update candidate is guaranteed to exist.
//
// may be useful as a functor
+/*
static bool require_item_update (const PoolItem& pi) {
Resolver_Ptr resolver = zypp::getZYpp()->resolver();
@@ -1944,7 +1945,7 @@
return true;
}
-
+*/
// ----------------------------------------------------------------------------
void xml_list_updates(const ResKindSet & kinds)
@@ -1982,7 +1983,7 @@
Patch::constPtr patch = asKind<Patch>(pi.resolvable());
if (pi.isRelevant() && ! pi.isSatisfied())
{
- if (ignore_affects_pm || patch->affects_pkg_manager ())
+ if (ignore_affects_pm || patch->restartSuggested())
{
// #221476
if (skip_interactive
@@ -2013,7 +2014,7 @@
{
DBG << "going to mark patches to install" << endl;
- // search twice: if there are none with affects_pkg_manager, retry on all
+ // search twice: if there are none with restartSuggested(), retry on all
bool any_marked = false;
for(unsigned ignore_affects_pm = 0;
!any_marked && ignore_affects_pm < 2; ++ignore_affects_pm)
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org