Added dump_pool in "zypper patches"
authorMartin Vidner <mvidner@suse.cz>
Fri, 3 Nov 2006 16:48:21 +0000 (16:48 +0000)
committerMartin Vidner <mvidner@suse.cz>
Fri, 3 Nov 2006 16:48:21 +0000 (16:48 +0000)
package/zypper.changes
src/zmart-misc.cc
src/zmart-misc.h
src/zypper.cc

index a83bad3..f35966c 100644 (file)
@@ -1,7 +1,8 @@
 -------------------------------------------------------------------
-Fri Nov  3 16:33:12 CET 2006 - mvidner@suse.cz
+Fri Nov  3 17:48:09 CET 2006 - mvidner@suse.cz
 
 - log to /var/log/YaST2/zypper.log (for save_y2logs too).
+- Added dump_pool in "zypper patches"
 
 -------------------------------------------------------------------
 Thu Nov  2 18:24:09 CET 2006 - mvidner@suse.cz
index 1d7f06d..597131a 100644 (file)
@@ -369,10 +369,30 @@ string string_status (const ResStatus& rs)
   return "error";
 }
 
+static void dump_pool ()
+{
+  int count = 1;
+  static bool full_pool_shown = false;
+
+  _XDEBUG( "---------------------------------------" );
+  for (ResPool::const_iterator it =   God->pool().begin(); it != God->pool().end(); ++it, ++count) {
+    
+    if (!full_pool_shown                                    // show item if not shown all before
+       || it->status().transacts()                         // or transacts
+       || !it->status().isUndetermined())                  // or established status
+    {
+      _DEBUG( count << ": " << *it );
+    }
+  }
+  _XDEBUG( "---------------------------------------" );
+  full_pool_shown = true;
+}
+
 // patches
-void show_pool()
+void show_patches()
 {
   MIL << "Pool contains " << God->pool().size() << " items. Checking whether available patches are needed." << std::endl;
+  dump_pool ();
 
   Table tbl;
   TableHeader th;
index ae8dcaa..c63b262 100644 (file)
@@ -33,7 +33,7 @@ void load_target();
 void load_sources();
 void establish ();
 void resolve();
-void show_pool();
+void show_patches();
 void patch_check();
 void list_updates( const zypp::ResObject::Kind &kind );
 void mark_updates( const zypp::ResObject::Kind &kind );
index d52632c..4b5bcc4 100644 (file)
@@ -687,7 +687,7 @@ int one_command(const string& command, int argc, char **argv)
     cond_init_system_sources ();
     cond_load_resolvables ();
     establish ();
-    show_pool ();
+    show_patches ();
     return 0;
   }