added status "no-update-repositories" to xml output when no update
authorThomas Goettlicher <tgoettlicher@suse.de>
Tue, 7 Aug 2007 14:26:09 +0000 (14:26 +0000)
committerThomas Goettlicher <tgoettlicher@suse.de>
Tue, 7 Aug 2007 14:26:09 +0000 (14:26 +0000)
repos are defined (#fate 300635)

src/zypper-misc.cc

index d504c1c..3c627fe 100644 (file)
@@ -705,11 +705,16 @@ bool xml_list_patches ()
   }
 
 
+  unsigned int patchcount=0;
+
   it = pool.byKindBegin<Patch> ();
 
   for (; it != e; ++it )
   {
     ResObject::constPtr res = it->resolvable();
+               
+    patchcount++;
+
     if ( it->status().isNeeded()) 
     {
       Patch::constPtr patch = asKind<Patch>(res);
@@ -740,6 +745,11 @@ bool xml_list_patches ()
     }
   }
 
+  if (patchcount == 0)
+  {
+    cout << "<appletinfo status=\"no-update-repositories\"/>" << endl;
+  }
+
   return pkg_mgr_available;
 
 }