From: Thomas Goettlicher Date: Tue, 7 Aug 2007 14:26:09 +0000 (+0000) Subject: added status "no-update-repositories" to xml output when no update X-Git-Tag: BASE-SuSE-Linux-10_3-Branch~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3541d418c77a007c71a79d2bab34a0b890818222;p=platform%2Fupstream%2Fzypper.git added status "no-update-repositories" to xml output when no update repos are defined (#fate 300635) --- diff --git a/src/zypper-misc.cc b/src/zypper-misc.cc index d504c1c..3c627fe 100644 --- a/src/zypper-misc.cc +++ b/src/zypper-misc.cc @@ -705,11 +705,16 @@ bool xml_list_patches () } + unsigned int patchcount=0; + it = pool.byKindBegin (); for (; it != e; ++it ) { ResObject::constPtr res = it->resolvable(); + + patchcount++; + if ( it->status().isNeeded()) { Patch::constPtr patch = asKind(res); @@ -740,6 +745,11 @@ bool xml_list_patches () } } + if (patchcount == 0) + { + cout << "" << endl; + } + return pkg_mgr_available; }